Re: [Haskell-cafe] Trouble with record syntax and classes

2007-02-26 Thread Aaron McDaid
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

Re: [Haskell-cafe] Newbie Q: GHCi: W here “List” module is imported from?

2007-02-16 Thread Aaron McDaid
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:

Re: [Haskell-cafe] IO is not a monad

2007-02-07 Thread Aaron McDaid
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

Re: [Haskell-cafe] IO is not a monad

2007-02-06 Thread Aaron McDaid
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

[Haskell-cafe] Polymorphism/monomorphism (and the restriction)

2006-09-21 Thread Aaron McDaid
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