
3 Dec
2008
3 Dec
'08
6:05 p.m.
module Test where --why does this work: data Test = Test class Foo t where foo :: Num v => t -> v -> IO () instance Foo Test where foo _ 1 = print $ "one" foo _ _ = print $ "not one" --but this doesn't? class Bar t where bar :: Foo v => t -> v -> IO () instance Bar Test where bar _ Test = print $ "test" bar _ _ = print $ "not test"