Personal tools

GHC/Error messages

From HaskellWiki

< GHC(Difference between revisions)
Jump to: navigation, search
(will fill this out once i find a small example)
Current revision (13:49, 3 December 2009) (edit) (undo)
m
 
(8 intermediate revisions not shown.)
Line 1: Line 1:
GHC error messages and their meaning.
GHC error messages and their meaning.
-
== Parse error in pattern ==
+
== "`foo' is not applied to enough type arguments" ==
 +
 
 +
TODO
 +
 
 +
Example: TODO
 +
 
 +
== "`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:
 +
<haskell>
 +
import Prelude hiding ((==))
 +
 
 +
data Foo = Foo
 +
 
 +
instance Eq Foo where
 +
(==) a b = True
 +
</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
TODO
Example: TODO
Example: TODO

Current revision

GHC error messages and their meaning.

Contents

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

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

3 "Cannot match a monotype with `Foo'"

See this Haskell-Cafe thread.


4 "Parse error in pattern"

TODO

Example: TODO