> Hi
> data Bool = False | True
> deriving (Eq, Or, Show, Read)
>
> Bool is an instance of Eq, Ord, Show and Read. It is derived form
> these classes.
No. "deriving ..." here does not mean that Bool is derived from those
classes; it's not a statement about inheritance or anything similar.
"deriving ..." means that the class instances for Bool, for those four
type classes, are automatically derived from the definition of Bool.
Does this make more sense?
No, sorry. I'm not sure how this differs from my definition.
Could you elaborate please?
Paul
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe