| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Morte.Parser
Description
Parsing logic for the Morte language
Synopsis
- exprFromText :: Text -> Either ParseError (Expr Path)
- data ParseError = ParseError {}
- data ParseMessage
Parser
exprFromText :: Text -> Either ParseError (Expr Path) Source #
Parse an Expr from Text or return a ParseError if parsing fails
Errors
data ParseError Source #
Structured type for parsing errors
Constructors
| ParseError | |
Fields | |
Instances
| Show ParseError Source # | |
Defined in Morte.Parser Methods showsPrec :: Int -> ParseError -> ShowS # show :: ParseError -> String # showList :: [ParseError] -> ShowS # | |
| Exception ParseError Source # | |
Defined in Morte.Parser Methods toException :: ParseError -> SomeException # fromException :: SomeException -> Maybe ParseError # displayException :: ParseError -> String # | |
| Buildable ParseError Source # | |
Defined in Morte.Parser Methods build :: ParseError -> Builder # | |
data ParseMessage Source #
The specific parsing error
Constructors
| Lexing Text | Lexing failed, returning the remainder of the text |
| Parsing Token [Token] | Parsing failed, returning the invalid token and the expected tokens |
Instances
| Show ParseMessage Source # | |
Defined in Morte.Parser Methods showsPrec :: Int -> ParseMessage -> ShowS # show :: ParseMessage -> String # showList :: [ParseMessage] -> ShowS # | |