On Dec 21, 2007 12:08 PM, Nicholls, Mark <[EMAIL PROTECTED]> wrote: > I thought from > > > > "Num numberType => SquareConstructor > numberType" > > > > We could deduce that (in English rather than get Haskell and FOL > confusion) > > > > all values of "SquareConstructor a"….the type of a would have be be in > class Num?.. > > is this not correct?....if not….why not? >
That's a reasonable thing to assume. It just happens that Haskell doesn't work that way. There's an asymmetry between constructing and pattern-matching, and it's one that many people have complained about. Personally, I never use class contexts in data declarations, simply because it's too easy to get confused about what they do and do not guarantee. -- Dave Menendez <[EMAIL PROTECTED]> <http://www.eyrie.org/~zednenem/>
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe