Copyright | (c) Henry J. Wylde, 2015 |
---|---|
License | BSD3 |
Maintainer | public@hjwylde.com |
Safe Haskell | None |
Language | Haskell2010 |
Exceptions and utility creation functions.
- data TypeException
- duplicateFunctionName :: Decl SourcePos -> TypeException
- duplicateParameterName :: Id SourcePos -> TypeException
- invalidArgumentsCount :: Expr SourcePos -> Int -> TypeException
- mismatchedType :: Type SourcePos -> [Type] -> TypeException
- undefinedFunctionCall :: Expr SourcePos -> TypeException
Type exceptions
data TypeException Source
An exception that occurs during type checking. See Language.Qux.TypeChecker.
Creation functions
duplicateFunctionName :: Decl SourcePos -> TypeException Source
duplciateFunctionName decl
creates a TypeException
indicating that a duplicate function
declaration decl
was found.
duplicateParameterName :: Id SourcePos -> TypeException Source
duplicateParameterName parameter
creates a TypeException
indicating that a duplicate
parameter parameter
was found.
invalidArgumentsCount :: Expr SourcePos -> Int -> TypeException Source
invalidArgumentsCount received expected
creates a TypeException
indicating that an
application call (received
) with an invalid number of arguments was passed to a function
expecting expected
.
mismatchedType :: Type SourcePos -> [Type] -> TypeException Source
mismatchedType received expects
creates a TypeException
indicating that one of expects
was expected.
undefinedFunctionCall :: Expr SourcePos -> TypeException Source
undefinedFunctionCall app
creates a TypeException
indicating that an application call
(app
) was made to an undefined function.