4 Dec 00:02
is there something special about the Num instance?
From: Anatoly Yakovenko <aeyakovenko <at> gmail.com>
Subject: is there something special about the Num instance?
Newsgroups: gmane.comp.lang.haskell.cafe
Date: 2008-12-03 23:05:37 GMT
Subject: is there something special about the Num instance?
Newsgroups: gmane.comp.lang.haskell.cafe
Date: 2008-12-03 23:05:37 GMT
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"
RSS Feed