Personal tools

GHC/Error messages

From HaskellWiki

< GHC(Difference between revisions)
Jump to: navigation, search
("Cannot match a monotype with `Foo'")
m ("Foo' is not a (visible) method of class `Bar'")
Line 1: Line 1:
 
GHC error messages and their meaning.
 
GHC error messages and their meaning.
   
== "Foo' is not a (visible) method of class `Bar'" ==
+
== "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.
 
This error message occurs when one tries to instantiate a class, but did not import the functions one tries to implement.

Revision as of 06:22, 15 October 2009

GHC error messages and their meaning.

1 "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

2 "Cannot match a monotype with `Foo'"

See this Haskell-Cafe thread.


3 "Parse error in pattern"

TODO

Example: TODO