| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Language.Futhark.Parser.Parser
Description
Futhark parser written with Happy.
Synopsis
- prog :: ParserMonad UncheckedProg
- expression :: ParserMonad UncheckedExp
- declaration :: ParserMonad UncheckedDec
- modExpression :: ParserMonad UncheckedModExp
- futharkType :: ParserMonad UncheckedTypeExp
- parse :: ParserMonad a -> Pos -> Text -> Either SyntaxError a
- parseWithComments :: ParserMonad a -> Pos -> Text -> Either SyntaxError (a, [Comment])
- data SyntaxError = SyntaxError {}
- data Comment = Comment {
- commentLoc :: Loc
- commentText :: Text
Documentation
parse :: ParserMonad a -> Pos -> Text -> Either SyntaxError a Source #
As 'parseWithComments, but throw away the comments.
parseWithComments :: ParserMonad a -> Pos -> Text -> Either SyntaxError (a, [Comment]) Source #
Parse something starting at the given position. The position also contains the input file name.
data SyntaxError Source #
A syntax error.
Constructors
| SyntaxError | |
Fields
| |
A comment consists of its starting and end position, as well as its text. The contents include the comment start marker.
Constructors
| Comment | |
Fields
| |