Difference between revisions of "GHC/Error messages"

From HaskellWiki
< GHC
Jump to navigation Jump to search
("Cannot match a monotype with `Foo'")
Line 1: Line 1:
 
GHC error messages and their meaning.
 
GHC error messages and their meaning.
 
== "Parse error in pattern" ==
 
 
TODO
 
 
Example: TODO
 
 
   
 
== "Foo' is not a (visible) method of class `Bar'" ==
 
== "Foo' is not a (visible) method of class `Bar'" ==
Line 21: Line 14:
 
(==) a b = True
 
(==) a b = True
 
</haskell>
 
</haskell>
  +
  +
== "Cannot match a monotype with `Foo'" ==
  +
  +
See [http://www.haskell.org/pipermail/haskell-cafe/2009-October/067806.html this] Haskell-Cafe thread.
  +
  +
 
== "Parse error in pattern" ==
  +
 
TODO
  +
 
Example: TODO

Revision as of 06:20, 15 October 2009

GHC error messages and their meaning.

"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

"Cannot match a monotype with `Foo'"

See this Haskell-Cafe thread.


"Parse error in pattern"

TODO

Example: TODO