GHC/Error messages
From HaskellWiki
(Difference between revisions)
(→"Foo' is not a (visible) method of class `Bar'") |
m (→"Foo' is not a (visible) method of class `Bar'") |
||
| Line 14: | Line 14: | ||
Example: | Example: | ||
<haskell> | <haskell> | ||
| - | import Prelude hiding ((==)) | + | import Prelude hiding ((==)) |
| - | data Foo = Foo | + | |
| + | data Foo = Foo | ||
| + | |||
instance Eq Foo where | instance Eq Foo where | ||
(==) a b = True | (==) a b = True | ||
</haskell> | </haskell> | ||
Revision as of 17:07, 9 October 2009
GHC error messages and their meaning.
1 "Parse error in pattern"
TODO
Example: TODO
2 "Foo' is not a (visible) method of class `Bar'"
This error message occurs when one tries to instantiate a class, but did not import the functions one tries to implement.
Example:
import Prelude hiding ((==)) data Foo = Foo instance Eq Foo where (==) a b = True
