[Haskell-cafe] Re: Generic types
adde at trialcode.com
Tue Jun 14 03:27:36 EDT 2005
While we're at it, I tried adding a class Length in between Unit and Meter, like
class Unit u where
shortName :: u -> String
class (Unit u) => Length u
instance Length Meter where
shortName u = "m"
>From the information I can find on the web subclassing should include all
of the methods in the superclasses but I get this error:
`shortName' is not a (visible) method of class `Length'
More information about the Haskell-Cafe