Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Sutori.Error
Description
- data SutError
- logError :: SutLogger -> [(SutError, SutLog)]
- lexerError :: String -> SutMonad ()
- parserError :: SutToken -> SutMonad a
- typeError :: SutExpression -> SutType -> SutType -> String -> SutMonad ()
- undefinedError :: SutID -> SymbolCat -> String -> SutMonad ()
- duplicateSymbolError :: SutSymbol a => a -> SutMonad ()
- duplicateMemberError :: SutID -> SutMonad ()
- argumentsNumberError :: SutID -> Int -> Int -> SutMonad ()
Documentation
Different possible Sutori Errors
Constructors
LexicalError | An unknown or malformed token was read |
GrammaticalError | The source code does not follow Sutori grammar |
TypeError | A Type error occurred |
UndefinedSymbolError | A symbol was used before it was defined |
ArgumentsNumberError | A function was called with the wrong number of arguments |
DuplicateSymbolError | A symbol was defined twice in the same scope |
InternalError | The compiler failed for a known reason (not the user's fault) |
NoError | The lack of error |
lexerError :: String -> SutMonad () Source #
Logs a lexical error and continues
parserError :: SutToken -> SutMonad a Source #
Logs a parsing error and throws out
typeError :: SutExpression -> SutType -> SutType -> String -> SutMonad () Source #
Logs a type error and continues
undefinedError :: SutID -> SymbolCat -> String -> SutMonad () Source #
Logs an undefined symbol error and continues
duplicateSymbolError :: SutSymbol a => a -> SutMonad () Source #
Logs a duplicate symbol error and continues
duplicateMemberError :: SutID -> SutMonad () Source #
Logs a duplicate member error and continues