Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Appendix E: Diagnostic Index

This table is generated from the final compiler’s error registry. Codes are stable identifiers. Messages and secondary labels add context about the source program. The primary label points to the location that triggered the diagnostic.

CodeMeaning
E0001Invalid token
E0002Invalid syntax
E0003Invalid layout
E0004Invalid projection dot
E0101Unbound variable
E0102Duplicate definition
E0103Unbound constructor or type
E0104Duplicate field
E0110Reserved operator redefined
E0111Primitive outside Prelude
E0120Recursive non-function binding
E0130Fixity without definition
E0201Type mismatch
E0202Infinite type
E0203Signature too general
E0210No instance
E0211Invalid instance methods or duplicate instance
E0230Ambiguous type
E0240Record must have one constructor
E0241Missing field
E0242Duplicate field binding
E0243Unknown field
E0244Type does not declare field
E0245Ambiguous field access
E0250Main must have type IO ()
E0301Kind mismatch
E0302Partially applied synonym
E0303Cyclic synonym
W0001Non-exhaustive match
W0002Redundant clause

Lexing, layout, and parsing use E00xx. Renaming uses E01xx, typing uses E02xx, and kind checking uses E03xx. A pass may report several diagnostics, but the driver does not run later passes after an error.

W0001 reports a possibly missing match and includes witness patterns when available. W0002 identifies an unreachable clause. Warnings do not reject a program. A missing match that execution actually reaches raises a runtime error.

Runtime errors have messages rather than compiler codes. They begin with fun: and exit with status 1. exitWith uses the requested status. Compiler dumps and internal lint failures are developer tools, not an alternative diagnostic API.

For an ambiguous record field, annotate the receiver’s type. For an ambiguous class constraint, make the constrained type visible in the result or select it explicitly. Fun does not default unresolved numeric constraints.