{-# LANGUAGE Safe #-}
module Language.Futhark.Parser
( parseFuthark
, parseExp
, parseModExp
, parseType
, parseValue
, parseValues
, parseDecOrExpIncrM
, ParseError (..)
, scanTokensText
, L(..)
, Token(..)
)
where
import qualified Data.Text as T
import Language.Futhark.Syntax
import Language.Futhark.Prop
import Language.Futhark.Parser.Parser
import Language.Futhark.Parser.Lexer
parseFuthark :: FilePath -> T.Text
-> Either ParseError UncheckedProg
parseFuthark :: FilePath -> Text -> Either ParseError UncheckedProg
parseFuthark = ParserMonad UncheckedProg
-> FilePath -> Text -> Either ParseError UncheckedProg
forall a. ParserMonad a -> FilePath -> Text -> Either ParseError a
parse ParserMonad UncheckedProg
prog
parseExp :: FilePath -> T.Text
-> Either ParseError UncheckedExp
parseExp :: FilePath -> Text -> Either ParseError UncheckedExp
parseExp = ParserMonad UncheckedExp
-> FilePath -> Text -> Either ParseError UncheckedExp
forall a. ParserMonad a -> FilePath -> Text -> Either ParseError a
parse ParserMonad UncheckedExp
expression
parseModExp :: FilePath -> T.Text
-> Either ParseError (ModExpBase NoInfo Name)
parseModExp :: FilePath -> Text -> Either ParseError (ModExpBase NoInfo Name)
parseModExp = ParserMonad (ModExpBase NoInfo Name)
-> FilePath -> Text -> Either ParseError (ModExpBase NoInfo Name)
forall a. ParserMonad a -> FilePath -> Text -> Either ParseError a
parse ParserMonad (ModExpBase NoInfo Name)
modExpression
parseType :: FilePath -> T.Text
-> Either ParseError UncheckedTypeExp
parseType :: FilePath -> Text -> Either ParseError UncheckedTypeExp
parseType = ParserMonad UncheckedTypeExp
-> FilePath -> Text -> Either ParseError UncheckedTypeExp
forall a. ParserMonad a -> FilePath -> Text -> Either ParseError a
parse ParserMonad UncheckedTypeExp
futharkType
parseValue :: FilePath -> T.Text
-> Either ParseError Value
parseValue :: FilePath -> Text -> Either ParseError Value
parseValue = ParserMonad Value -> FilePath -> Text -> Either ParseError Value
forall a. ParserMonad a -> FilePath -> Text -> Either ParseError a
parse ParserMonad Value
anyValue
parseValues :: FilePath -> T.Text
-> Either ParseError [Value]
parseValues :: FilePath -> Text -> Either ParseError [Value]
parseValues = ParserMonad [Value]
-> FilePath -> Text -> Either ParseError [Value]
forall a. ParserMonad a -> FilePath -> Text -> Either ParseError a
parse ParserMonad [Value]
anyValues