
14 Jun
2005
14 Jun
'05
3:27 a.m.
While we're at it, I tried adding a class Length in between Unit and Meter, like this: 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'