The Haskell Error Index

Welcome

This site describes the various messages that can be returned by Haskell-related tools, including both errors and warnings. For example GHC, the most-commonly-used Haskell implementation, started emiting a code with the format [GHC-12345] for its messages in version 9.6.1. These codes can be looked up below for further information.

So far, 125 errors and warnings are documented here. If you encounter a message that is not yet documented, please open an issue or submit a pull request with documentation. Pull requests with additional examples and improved explanations for existing messages are also very welcome, as are improvements to the generated site.

This site is a project of The Haskell Foundation. Please get in touch if you have feedback or if you'd like to get involved!

The Messages

Nr.MessageSummarySince
Cabal-7070 Run whole executable Cabal runs executables but not modules 3.12.1.0
GHC-00158 Cannot derive instance for non-stock-deriveable class An instance cannot be derived because the class is not stock deriveable. 9.6.1
GHC-00482 Lambda syntax in pattern Lambda syntax appears in a pattern match. 9.6.1
GHC-00711 Duplicate warning declarations Duplicate deprecation warnings are illegal 9.6.1
GHC-01239 Unexpected if expression in function application If expression used as function argument 9.6.1
GHC-01629 Too many type arguments in constructor pattern Too many type applications to a constructor in a pattern. 9.6.1
GHC-02256 Ambiguous record update Record update with duplicate field names is ambiguous 9.6.1
GHC-03272 Bidirectional formatting warning The source file contains Unicode bidirectional formatting instructions 9.6.1
GHC-04584 Expression syntax in pattern There has been an attempt to pattern match on expression syntax. 9.6.1
GHC-04924 Unknown flag in GHC options pragma Unknown flag in {-# OPTIONS_GHC #-} pragma. 9.6.1
GHC-04956 Can't derive instances of nullary classes It is not possible to derive instances of argumentless type classes without the DeriveAnyClass extension. 9.6.1
GHC-05380 Multiple newtype constructors More than 1 constructor for a newtype 9.6.1
GHC-05641 Multiple Haddock comments Multiple Haddock comments for a single entity are not allowed 9.6.1
GHC-05661 Cannot use qualified both before and after the module A module cannot be imported using the qualified modifier both before and after the name of the module 9.6.1
GHC-05989 Too many type binders A type constructor is declared with more arguments than its kind annotation specifies. 9.6.1
GHC-06201 Missing method in type class instance A required method is missing from the instance declaration. 9.6.1
GHC-06202 Illegal type signature in instance declaration Method in class instance has type signature, but extension InstanceSigs is not enabled 9.6.1
GHC-06446 Do notation in pattern match Do notation in pattern match. 9.6.1
GHC-07626 Parse error in pattern Compiler not able to parse pattern. 9.6.1
GHC-08838 Wrong do bind Returning a monadic computation in a do block and not binding it will not run it 9.6.1
GHC-09009 Illegal role name. Type roles should be one of representational, nominal, or phantom. 9.6.1
GHC-09646 Tuple section in pattern There has been an attempt to pattern match on a tuple section. 9.6.1
GHC-10190 Empty enumeration An enumeration would be empty. 9.6.1
GHC-10333 Generalized newtype deriving doesn't work on non-newtypes Generalized newtype deriving works only for types declared with the newtype keyword. 9.6.1
GHC-11861 Empty single quotes No character literal provided within single quotes. 9.6.1
GHC-11913 Illegal deriving item Something other than a type class appears in a deriving statement. 9.6.1
GHC-12003 Type equality not in scope The type equality operator has not been imported into the current module. 9.6.1
GHC-13218 Illegal linear function in kind A linear function was used for a higher kind, which is not allowed 9.6.1
GHC-19244 Module is annotated as trustworthy, but is inferred as safe The module is annotated to be trustworthy, but it could be annotated as safe 9.6.1
GHC-20125 Missing field(s) Initialization of record with missing field(s). 9.6.1
GHC-20825 Empty record update Record update syntax requires that at least one field be specified. 9.6.1
GHC-21231 Numeric escape sequence out of range The numeric escape sequence represents a number that is too large 9.6.1
GHC-24180 Too few arguments to infix type operator A type operator was not provided with both arguments. 9.6.1
GHC-25078 Precedence out of range An invalid operator precedence was provided. 9.6.1
GHC-25897 GADT pattern match must have a known result type A pattern match on a GADT cannot succeed unless GHC knows the result type of the pattern match. 9.6.1
GHC-27207 Missing space after tilde `~` Lazy pattern in expression context. 9.6.1
GHC-28007 Misplaced LANGUAGE pragma LANGUAGE pragmas should come before the module declaration. 9.6.1
GHC-30606 Redundant constraints A binding has constraints that are redundant. 9.6.1
GHC-31574 Illegal use of linear functions The linear function type is used, but LinearTypes are not enabled 9.6.1
GHC-38520 Redundant Bang Patterns Used a bang pattern that has no effect 9.6.1
GHC-39999 No instance arising An expression requires a type class instance which is not provided by the context. 9.6.1
GHC-40798 Operator whitespace An optional warning for detecting usage of infix, suffix or prefix operators that could be parsed differently in future due to whitespace. 9.6.1
GHC-42044 Unrecognised pragma GHC didn't recognize pragma and will thus ignore it 9.6.1
GHC-44360 Cannot import unsafe modules in Safe Haskell Only safe modules can be imported in modules which are declared safe 9.6.1
GHC-44432 Type signature lacks an accompanying binding A type signature was provided, but no binding was given. 9.6.1
GHC-45696 If-Then-Else in pattern match If-Then-Else expression in pattern match. 9.6.1
GHC-46537 Unsupported extension GHC failed to recognize name of a language extension 9.6.1
GHC-46956 Kind variable would escape its scope A local kind variable was used to classify a type from a scope in which the kind variable is not available. 9.6.1
GHC-47535 Identifier is not a record selector An identifier does not refer to a record selector but is used as such. 9.6.1
GHC-47854 Duplicate Exports An identifier appears twice in an export list. 9.6.1
GHC-48099 Top-level strict or unlifted binds not allowed Top-level bindings may not be strict, and they may not have unlifted types. 9.6.1
GHC-48361 Binding type variables is not allowed in pattern bindings You can only bind value-level variables in a pattern, not type variables. 9.6.1
GHC-49957 Unticked promoted constructors A promoted data constructor was used as a type without it being indicated with a tick mark. 9.6.1
GHC-51179 Missing LambdaCase Missing LambdaCase language extension 9.6.1
GHC-53633 Redundant patterns A pattern is impossible to reach due to earlier patterns 9.6.1
GHC-53786 Case expression included in pattern A pattern contains case-of syntax. 9.6.1
GHC-54540 Cannot derive instance without constructors in scope It is not possible to derive a typeclass instance if the constructors of the type are not in scope 9.6.1
GHC-55666 Strictness annotation on unlifted type Using a strictness annotation (bang) on an unlifted type is redudant as unlifted values are strict by definition 9.6.1
GHC-56147 Rewrite rules are ignored in Safe Haskell Rewrite rules are not allowed in Safe Haskell and are therefore ignored 9.6.1
GHC-56538 Instance head is not headed by a class A type class instance declaration is declared for something that is not a type class. 9.6.1
GHC-57396 Linear types are not supported in FFI Linear types are not supported when using GHC's FFI functionality 9.6.1
GHC-58008 Pattern matching on GADTs without MonoLocalBinds is fragile Pattern matching on GADTs without MonoLocalBinds is fragile 9.6.1
GHC-58481 Parse error on input Generic parsing error. 9.6.1
GHC-58656 Module is inferred to be safe If a module is inferred as safe, then it should be annotated as safe 9.6.1
GHC-59155 Illegal tuple section A tuple section is used, but the TupleSections extension is not enabled 9.6.1
GHC-59692 Duplicate Instances Multiple instances defined for the same type class and type. 9.6.1
GHC-59738 Scoped type variables only appears non-injectively in declaration header A data declaration has a kind signature, where the implictly bound type variables cannot be matched up unambiguosly with the ones from the signature itself 9.6.4
GHC-59840 GHC does not support GADTs or type families which witness equality of multiplicities GHC does not support GADTs or type families which witness equality of multiplicities 9.6.1
GHC-61689 Bad import not exported Module does not export the imported symbol. 9.8.1
GHC-62016 Cannot derive well-kinded instance An instance cannot be derived because the kinds cannot be made to match. 9.6.1
GHC-62161 Incomplete patterns Pattern match(es) are non-exhaustive. 9.6.1
GHC-62330 Underscores not allowed in float and integer literals Float and integer literals cannot contain underscores. 9.6.1
GHC-63394 Messages from WARNING and DEPRECATED pragmas Warning or deprecation message attached to a function, class, type, or module in a library 9.6.1
GHC-64088 Use of "forall" as an identifier Use of "forall" as an identifier is discouraged 9.6.1
GHC-64725 User-defined type error An invalid constraint or type family reduces to a custom type error. 9.6.1
GHC-66228 View pattern in expression context A view pattern was used in an expression, rather than a pattern. 9.6.1
GHC-68686 Cannot parse LANGUAGE pragma The arguments to the LANGUAGE pragma could not be parsed 9.6.1
GHC-69158 Conflicting exports Different identifiers with the same name are (re-)exported from the same module. 9.6.1
GHC-69925 Illegal unboxed string literal in pattern Illegal unboxed string literal in pattern. 9.6.1
GHC-70712 Double dots in record update Double-dot syntax is not allowed in a record update. 9.6.1
GHC-71614 Lambda requires at least one parameter A lambda expression must have at least one parameter. 9.6.1
GHC-75356 Export item suggests constructors/methods An export item suggests that (in-scope) constructors or class methods exist when they do not. 9.6.1
GHC-76037 Not in scope An identifier is not in scope. 9.6.1
GHC-77037 No explicit import list Items brought into scope are not listed explicitly. 9.6.1
GHC-77539 Illegal tuple constraint A tuple of constraints was used without enabling the ConstraintKinds extension 9.6.1
GHC-78892 let-syntax in pattern An attempt has been made to use a let expression whilst pattern matching. 9.6.1
GHC-80768 Class kind signatures need to be constraints It is an error to use type families in the return kind of a class 9.6.1
GHC-81995 Unused "do" bind A return value of a monadic action is ignored 9.6.1.
GHC-83475 Unused Record Wildcard Pattern contains record wildcard that is not used 9.6.1
GHC-83865 Type Mismatch You provided a value of a given type, whereas GHC expected a different type. 9.6.1
GHC-84077 Type application without space A type application with @ does not have a space before. 9.6.1
GHC-87139 Illegal deriving strategy Use of a deriving strategy without enabling the corresponding language extension 9.8.1
GHC-87429 Illegal datatype context Constraints present in datatype declaration without DatatypeContexts. 9.6.1
GHC-87491 Found 'qualified' after the module qualified after the module requires the ImportQualifiedPost extension. 9.6.1
GHC-88464 Variable not in scope An unknown variable name was referenced. 9.6.1
GHC-88747 Precedence parsing error Cannot determine the order of operators in an expression 9.6.1
GHC-88933 Non-numeric type in default declaration Default declarations may only mention types which implement the Num type class 9.6.1
GHC-89347 Constraint tuple arity too large A constraint cannot be defined on a tuple with a big arity 9.6.1
GHC-90177 Orphan instance An instance was defined separately from its type or class. 9.6.1
GHC-90584 Deriving `Typeable` has no effect The type class `Typeable` does not need to be derived. 9.6.1
GHC-91028 Cannot equate polymorphic types with type variables During type inference, GHC can't instantiate a type variable with a type that is itself polymorphic. 9.6.1
GHC-91938 Equations have different number of arguments Each equation in a function definition must have the same number of arguments. 9.6.1
GHC-92994 Unexpected nested forall in foreign declaration A foreign function import uses a higher-rank type. 9.6.1
GHC-93557 Illegal typeclass instance Illegal typeclass instance 9.8.1
GHC-94458 Illegal position of Haddock comment A Haddock comment appears in an illegal position 9.6.1
GHC-94817 Tab character A tab character occurred in the input file. 9.6.1
GHC-95644 Missing space after exclamation mark `!` Bang pattern in expression context. 9.6.1
GHC-95781 Invalid type application The expression cannot be applied to the given type argument. 9.6.1
GHC-95909 Missing strict fields Constructor was not instantiated with required strict field(s). 9.6.1
GHC-97044 User-specified instance is not allowed Type class does not allow user-specified instances 9.6.1
GHC-97170 Duplicate role annotations A type declaration has more than one accompanying role annotation 9.8.1
GHC-97441 Overflowed Literals Literal overflowing range of supported values 9.6.1
GHC-97739 Kind and type arguments out of dependency order Kind arguments must occur prior to the types that they classify. 9.6.1
GHC-98980 Command syntax in pattern Arrow command syntax was used in a pattern. 9.6.1
GHC-99565 Multiple default declarations Multiple default declarations are not allowed 9.6.1
GHC-99623 Import item suggests constructors/methods An import item suggests that (in-scope) constructors or class methods exist when they do not. 9.6.1
GHCup-00010 Unable to find a download for the requested version/distro GHCup wasn't able to find a binary distribution for the requested tool for the current platform 0.1.19.0
GHCup-00110 The tool is already installed with that version GHCup has already installed the requested version of the tool 0.1.19.0
GHCup-00160 JSON decoding failed GHCup was unable to decode a JSON or YAML document (e.g. metadata file) 0.1.19.0
GHCup-00200 File digest verification failed GHCup tried to verify the integrity/authenticity of a downloaded file, but the verification failed 0.1.19.0
GHCup-00210 GPG verify failed GHCup tried to verify the authenticity of a software channel using GPG, but failed 0.1.19.0
GHCup-00841 A process exited prematurely GHCup executed a subprocess that did not complete successfully 0.1.19.0
GHCup-05841 A download failed GHCup tried to download a tool, but the download failed with a subprocess exiting prematurely 0.1.19.0
S-4804 Stack failed to construct a build plan The package with the given name or version could not be found in the snapshot 2.9.3
S-6602 Could not parse YAML configuration file A YAML configuration file was either not well-formed YAML or didn't contain the expected data 2.9.3