{-# LANGUAGE CPP #-}
module Data.TPTP.Parse.Text.Lazy (
parseUnit,
parseTPTP
) where
#if !MIN_VERSION_base(4, 8, 0)
import Control.Applicative ((*>), (<*))
#endif
import Data.Attoparsec.Text.Lazy (Result, parse, endOfInput)
import Data.Text.Lazy (Text)
import Data.TPTP (Unit, TPTP)
import Data.TPTP.Parse.Combinators (whitespace, unit, tptp)
parseUnit :: Text -> Result Unit
parseUnit = parse (whitespace *> unit <* endOfInput)
parseTPTP :: Text -> Result TPTP
parseTPTP = parse (whitespace *> tptp <* endOfInput)