Hi all,
I encountered a problem when trying to
derive makeBinary ''DiffTime
with help of *derive* package. The error was:
Not in scope: data constructor `MkDiffTime'
Which makes a sense, since it's not exported in Data.Time.Clock.
I bypassed the problem (yes, I'm too lazy to write instances
I'm interested if it's possible to use functions from some module without
explicitly importing it. In ghci it's done on the fly, like this:
Prelude Data.Map.empty
Loading package array-0.3.0.2 ... linking ... done.
Loading package containers-0.4.0.0 ... linking ... done.
fromList []
But without
Hi. I'm writing GUI (gtk) program which purpose is take some data as user
input, perform some evaluations, and produce some plots and coefficients.
Since some evaluations take significant time (about 10 seconds), I try to
cache results. The problem is that dependency structure is quite
On Sun, Aug 15, 2010 at 10:50 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
Yeah, I'm working on something like this at the moment, but I'm
currently stuck on naming: if I want to have Functor for kind * - *,
what's a good name for a type class for kind *?
I was thinking about
I was inspired by George Pollard's
posthttp://www.haskell.org/pipermail/haskell-cafe/2009-July/063981.htmlat
haskell-cafe and tried to implement the non-polymorphic Functor class
( I
named it Functor' ). I changed some names and added reasonable constraints.
type family NewPt f a
class
On Sat, Aug 14, 2010 at 2:27 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
Alexey Karakulov ankaraku...@gmail.com writes:
(Ord b) must be deduced from (Functor (Set b)) but it doesn't. I don't
know
whether it's my mistake somewhere or ghc problem.
I've come across
Suppose I have one piece of code like this:
class Result r e | r - e where
failure :: e - r a
success :: a - r a
at :: Result r String = [a] - Int - r a
at xs i = if i = 0 i length xs
then success (xs !! i)
else failure Wrong index
Either instance of
I wonder if pattern matching could be less verbose. Maybe this sounds weird,
but here is example of what I mean:
type A = (Int, String)
f :: String - A - A
f s (i,s') = (i, s ++ s')
data B = B Int String deriving Show
g :: String - B - B
g s (B i s') = B i $ s ++ s'
Types A/B and