| |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Description | |||||||||||||||||||||||||||||||||||||||||||
Base type for errors occuring in parsing, analysing and pretty-printing. With ideas from Simon Marlow's An extensible dynamically-typed hierarchy of execeptions [2006] | |||||||||||||||||||||||||||||||||||||||||||
Synopsis | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Severity Level | |||||||||||||||||||||||||||||||||||||||||||
data ErrorLevel | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
isHardError :: Error ex => ex -> Bool | |||||||||||||||||||||||||||||||||||||||||||
return True when the given error makes it impossible to continue analysis or compilation. | |||||||||||||||||||||||||||||||||||||||||||
Error class | |||||||||||||||||||||||||||||||||||||||||||
class (Typeable e, Show e) => Error e where | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
errorPos :: Error e => e -> Position | |||||||||||||||||||||||||||||||||||||||||||
position of an Error | |||||||||||||||||||||||||||||||||||||||||||
errorLevel :: Error e => e -> ErrorLevel | |||||||||||||||||||||||||||||||||||||||||||
severity level of an Error | |||||||||||||||||||||||||||||||||||||||||||
errorMsgs :: Error e => e -> [String] | |||||||||||||||||||||||||||||||||||||||||||
message lines of an Error | |||||||||||||||||||||||||||||||||||||||||||
Error supertype | |||||||||||||||||||||||||||||||||||||||||||
data CError | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Infos attached to errors | |||||||||||||||||||||||||||||||||||||||||||
data ErrorInfo | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
showError :: Error e => String -> e -> String | |||||||||||||||||||||||||||||||||||||||||||
showErrorInfo :: String -> ErrorInfo -> String | |||||||||||||||||||||||||||||||||||||||||||
converts an error into a string using a fixed format
<fname>:<row>: (column <col>) [<err lvl>] >>> <line_1> <line_2> ... <line_n> | |||||||||||||||||||||||||||||||||||||||||||
mkErrorInfo :: ErrorLevel -> String -> NodeInfo -> ErrorInfo | |||||||||||||||||||||||||||||||||||||||||||
Default error types | |||||||||||||||||||||||||||||||||||||||||||
data UnsupportedFeature | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
unsupportedFeature :: Pos a => String -> a -> UnsupportedFeature | |||||||||||||||||||||||||||||||||||||||||||
unsupportedFeature_ :: String -> UnsupportedFeature | |||||||||||||||||||||||||||||||||||||||||||
data UserError | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
userErr :: String -> UserError | |||||||||||||||||||||||||||||||||||||||||||
Raising internal errors | |||||||||||||||||||||||||||||||||||||||||||
internalErr :: String -> a | |||||||||||||||||||||||||||||||||||||||||||
raise a fatal internal error; message may have multiple lines | |||||||||||||||||||||||||||||||||||||||||||
Produced by Haddock version 2.7.2 |