From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Richard A. O'Keefe
On 21 May 2008, at 9:25 am, Conal Elliott wrote:
I think the practice of constraint in type definitions is
generally
discouraged,
Is this true? If so, why?
If I have a data type that simply
GHC's (maybe Haskell98's?) Complex type is defined with a RealFloat
constraint on type type itself, rather than on some of the instances and
functions:
data (RealFloat a) = Complex a = !a :+ !a
I think the practice of constraint in type definitions is generally
discouraged, and I'm
On 21 May 2008, at 9:25 am, Conal Elliott wrote:
I think the practice of constraint in type definitions is generally
discouraged,
Is this true? If so, why?
If I have a data type that simply doesn't make sense unless some of the
type variables belong to certain classes, _shouldn't_ that be