Brent Yorgey | 21 Dec 18:28
Picon

Re: nice simple problem for someone struggling....



"class ShapeInterface shape where
       area :: shape->Int"

now looks dubious....I want it to be something like

"class ShapeInterface shape where
       area :: Num numberType => shape->Int" ?

Rather, I think you probably want

class ShapeInterface shape where
    area :: Num numberType => shape -> numberType

-Brent

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane