On 2/26/07, Thomas Nelson [EMAIL PROTECTED] wrote:
I'm brand new to haskell and I'm having trouble using classes. The basic idea
is I want two classes, Sine and MetaSine, that are both instances of ISine.
'class' in Haskell doesn't mean the same as 'class' in C++ or Java. I
found it easier at
On 2/16/07, Dmitri O.Kondratiev [EMAIL PROTECTED] wrote:
where then declaration:
instance Ord []
can be found?
With Hugs, it can be found in /usr/lib/hugs/libraries/Hugs/Prelude.hs
(on Debian anyway). For GHC, I guess it's in compiled into one of the
.hi files? From Hugs' Prelude.hs:
Could seq be changed so that it will not give an error if it finds
undefined? Am I right in thinking that seq is supposed to
theoretically do nothing, but simply give a hint to the compiler so to
speak? If that is true, it should merely attempt to evaluate it, but
ignore it if it cannot evaluate
Hi,
Apologies for referring to this old thread...
I rearranged the code a little bit while experimenting but retained
the same behaviour:
Prelude let f = undefined :: Int - IO Int
Prelude (f 3 f 3) `seq` 42
42
Prelude (f 3) `seq` 42
*** Exception: Prelude.undefined
I think
Hi,
I think the following might help a little in understanding the
monomorphic restriction (which I don't fully understand myself). I'm a
bit of a newbie so apologies in advance if I've made a mistake or if my
description isn't as useful to others as it seems to me. I've been
following a