haskell-cafe@haskell.org
[Top] [All Lists]

RE: [Haskell-cafe] nice simple problem for someone struggling....

Subject: RE: [Haskell-cafe] nice simple problem for someone struggling....
From: "Nicholls, Mark"
Date: Fri, 21 Dec 2007 16:37:06 -0000
Really....I'm sure I tried that...(as it seemed obvious) ... and it
failed....but I'll have another go....

-----Original Message-----
From: Jules Bean [mailto:jules@xxxxxxxxxxxxxxx] 
Sent: 21 December 2007 15:33
To: Nicholls, Mark
Cc: haskell-cafe@xxxxxxxxxxx
Subject: Re: [Haskell-cafe] nice simple problem for someone
struggling....

Nicholls, Mark wrote:
> *instance* ShapeInterface SquareType *where*
> 
>       area (SquareConstructor sideLength) = sideLength * sideLength


> *data* SquareType a = Num a => SquareConstructor a


Now you have changed your type from SquareType to SquareType a, you need

to change the instance to:

instance ShapeInterface (SquareType a) where...


Jules
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>