Hi,
I'm trying to make three haskell classes
and an instance this way:
class (Eq a) => Graph a where
vert :: [a]
ady :: a -> [a]
class (Graph a) => Paths a where
gps :: a -> a -> [[a]]
class (Paths a) => Minimum a where
mgps :: a -> a -> [a]
instance Minimum Char where
vert = ['a' .. 'f'] ady 'a' = ['b', 'c']
ady 'b' = ['d', 'c', 'e']
ady 'd' = ['f']
gps = bepgr mgps = head gps
When I try to run this I get: "ERROR:
filepath:line -No member vert in class "Minimum"" I don't know why does this
happen, am I doing something wrong?
Thank you.