Safe Haskell | None |
---|---|
Language | Haskell2010 |
Importify.ParseException
Description
This module contains data type for parsing exception and pretty formatting of such exceptions.
- data ModuleParseException = MPE !SrcLoc !String
- eitherParseResult :: ParseResult res -> Either ModuleParseException res
- reportErrorsIfAny :: [ModuleParseException] -> Text -> IO ()
- setMpeFile :: FilePath -> ModuleParseException -> ModuleParseException
Documentation
data ModuleParseException Source #
eitherParseResult :: ParseResult res -> Either ModuleParseException res Source #
Converts ParseResult
into Either
making error look pretty.
reportErrorsIfAny :: [ModuleParseException] -> Text -> IO () Source #
Prints parse errors if list of errors is not empty.
setMpeFile :: FilePath -> ModuleParseException -> ModuleParseException Source #
Updates file name of error location. Sometimes error location
looks like - Location: : -1: -1
which is not very helpful.