| Safe Haskell | None | 
|---|---|
| Language | GHC2021 | 
Language.Futhark.Parser
Description
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 :: Type -> Type) 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 :: Type -> Type) 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.
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 
  | |