Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Interface to the Futhark parser.
Synopsis
- parseFuthark :: FilePath -> Text -> Either SyntaxError UncheckedProg
- parseFutharkWithComments :: FilePath -> Text -> Either SyntaxError (UncheckedProg, [Comment])
- parseExp :: FilePath -> Text -> Either SyntaxError UncheckedExp
- parseModExp :: FilePath -> Text -> Either SyntaxError (ModExpBase NoInfo Name)
- parseType :: FilePath -> Text -> Either SyntaxError UncheckedTypeExp
- parseDecOrExp :: FilePath -> Text -> Either SyntaxError (Either UncheckedDec UncheckedExp)
- data SyntaxError = SyntaxError {}
- data Comment = Comment {
- commentLoc :: Loc
- commentText :: Text
Documentation
parseFuthark :: FilePath -> Text -> Either SyntaxError UncheckedProg Source #
parseFutharkWithComments :: FilePath -> Text -> Either SyntaxError (UncheckedProg, [Comment]) Source #
parseExp :: FilePath -> Text -> Either SyntaxError UncheckedExp Source #
parseModExp :: FilePath -> Text -> Either SyntaxError (ModExpBase NoInfo Name) Source #
parseType :: FilePath -> Text -> Either SyntaxError UncheckedTypeExp Source #
parseDecOrExp :: FilePath -> Text -> Either SyntaxError (Either UncheckedDec UncheckedExp) Source #
Parse either an expression or a declaration; favouring declarations in case of ambiguity.
A comment consists of its starting and end position, as well as its text. The contents include the comment start marker.
Comment | |
|