Nice looking errors.
- module Text.Pretty
- data Error
- = forall p . Pretty p => PrettyError p
- | ErrorMessage [Error]
- | NoRaise [Error]
- class ErrorReport err where
- new_error :: Pretty p => p -> Error
- empty_error :: Error
- error_line :: Pretty p => p -> Error -> Error
- error_lines :: Pretty p => [p] -> Error -> Error
- error_section :: Error -> Error
- error_join :: [Error] -> Error
- broken :: String -> String -> String -> [String] -> Error -> a
Documentation
module Text.Pretty
A nice looking error
forall p . Pretty p => PrettyError p | Error text |
ErrorMessage [Error] | |
NoRaise [Error] |
class ErrorReport err whereSource
A class for things which can be turned into error reports
An empty error
error_line :: Pretty p => p -> Error -> ErrorSource
Add a line to the start of the error (This appears further up the error report)
error_lines :: Pretty p => [p] -> Error -> ErrorSource
Add a number of lines to the start of the error
error_section :: Error -> ErrorSource
Create a new error section (This appears further up, and with fewer tabs than the rest of the report)
error_join :: [Error] -> ErrorSource
Combine multiple errors into one report