Personal tools

GHC/Error messages

From HaskellWiki

< GHC(Difference between revisions)
Jump to: navigation, search
("Foo' is not a (visible) method of class `Bar'")
m
 
(5 intermediate revisions by one user not shown)

Latest revision as of 13:49, 3 December 2009

GHC error messages and their meaning.

Contents

[edit] 1 "`foo' is not applied to enough type arguments"

TODO

Example: TODO

[edit] 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

[edit] 3 "Cannot match a monotype with `Foo'"

See this Haskell-Cafe thread.


[edit] 4 "Parse error in pattern"

TODO

Example: TODO