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"
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to