
7 Apr
2008
7 Apr
'08
5:05 p.m.
Paul,
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? John