module Data.TPTP.Parse.Text (
parseUnit,
parseUnitOnly,
parseUnitWith,
parseTPTP,
parseTPTPOnly,
parseTPTPWith,
parseTSTP,
parseTSTPOnly,
parseTSTPWith,
) where
import Data.Attoparsec.Text (Result, parse, parseOnly, parseWith)
import Data.Text (Text)
import Data.TPTP (Unit, TPTP, TSTP)
import Data.TPTP.Parse.Combinators (input, unit, tptp, tstp)
parseUnit :: Text -> Result Unit
parseUnit :: Text -> Result Unit
parseUnit = Parser Unit -> Text -> Result Unit
forall a. Parser a -> Text -> Result a
parse (Parser Unit -> Parser Unit
forall a. Parser a -> Parser a
input Parser Unit
unit)
parseUnitOnly :: Text -> Either String Unit
parseUnitOnly :: Text -> Either String Unit
parseUnitOnly = Parser Unit -> Text -> Either String Unit
forall a. Parser a -> Text -> Either String a
parseOnly (Parser Unit -> Parser Unit
forall a. Parser a -> Parser a
input Parser Unit
unit)
parseUnitWith :: Monad m => m Text -> Text -> m (Result Unit)
parseUnitWith :: m Text -> Text -> m (Result Unit)
parseUnitWith m Text
m = m Text -> Parser Unit -> Text -> m (Result Unit)
forall (m :: * -> *) a.
Monad m =>
m Text -> Parser a -> Text -> m (Result a)
parseWith m Text
m (Parser Unit -> Parser Unit
forall a. Parser a -> Parser a
input Parser Unit
unit)
parseTPTP :: Text -> Result TPTP
parseTPTP :: Text -> Result TPTP
parseTPTP = Parser TPTP -> Text -> Result TPTP
forall a. Parser a -> Text -> Result a
parse (Parser TPTP -> Parser TPTP
forall a. Parser a -> Parser a
input Parser TPTP
tptp)
parseTPTPOnly :: Text -> Either String TPTP
parseTPTPOnly :: Text -> Either String TPTP
parseTPTPOnly = Parser TPTP -> Text -> Either String TPTP
forall a. Parser a -> Text -> Either String a
parseOnly (Parser TPTP -> Parser TPTP
forall a. Parser a -> Parser a
input Parser TPTP
tptp)
parseTPTPWith :: Monad m => m Text -> Text -> m (Result TPTP)
parseTPTPWith :: m Text -> Text -> m (Result TPTP)
parseTPTPWith m Text
m = m Text -> Parser TPTP -> Text -> m (Result TPTP)
forall (m :: * -> *) a.
Monad m =>
m Text -> Parser a -> Text -> m (Result a)
parseWith m Text
m (Parser TPTP -> Parser TPTP
forall a. Parser a -> Parser a
input Parser TPTP
tptp)
parseTSTP :: Text -> Result TSTP
parseTSTP :: Text -> Result TSTP
parseTSTP = Parser TSTP -> Text -> Result TSTP
forall a. Parser a -> Text -> Result a
parse Parser TSTP
tstp
parseTSTPOnly :: Text -> Either String TSTP
parseTSTPOnly :: Text -> Either String TSTP
parseTSTPOnly = Parser TSTP -> Text -> Either String TSTP
forall a. Parser a -> Text -> Either String a
parseOnly Parser TSTP
tstp
parseTSTPWith :: Monad m => m Text -> Text -> m (Result TSTP)
parseTSTPWith :: m Text -> Text -> m (Result TSTP)
parseTSTPWith m Text
m = m Text -> Parser TSTP -> Text -> m (Result TSTP)
forall (m :: * -> *) a.
Monad m =>
m Text -> Parser a -> Text -> m (Result a)
parseWith m Text
m Parser TSTP
tstp