
24 Aug
2007
24 Aug
'07
8:33 a.m.
Thomas Girod wrote:
Hi there.
I'm trying to define a generic graph type here and don't understand on one error I get. Here I come.
module Graph where
class (Eq n, Eq e) => Topo a n e where empty :: a nodes :: a -> [n] edges :: a -> [e]
This does not work without functional dependencies. Try: class (Eq n, Eq e) => Topo a n e | a -> n e where HTH Christian P.S. Integer comes in via defaulting (of 0 or 1)