Copyright | (c) Henry J. Wylde, 2015 |
---|---|
License | BSD3 |
Maintainer | public@hjwylde.com |
Safe Haskell | None |
Language | Haskell2010 |
Exceptions and utility functions.
Type exception
data TypeException Source
An exception that occurs during type checking. See Language.Qux.Annotated.TypeChecker.
TypeException SourcePos String | A generic type exception with a position and message. |
DuplicateFunctionName SourcePos Id | Indicates a function of the given name already exists. |
DuplicateParameterName SourcePos Id | Indicates a parameter of the given name already exists. |
InvalidFunctionCall SourcePos Int Int | Indicates the wrong number of arguments was passed to the function call. |
MismatchedType SourcePos Id [Id] | Indicates a type mismatch. |
pos :: TypeException -> SourcePos Source
Extracts the source position from the exception.
message :: TypeException -> String Source
Creates a human understandable message from the exception.