jukebox-0.4.2: A first-order reasoning toolbox

Safe HaskellSafe
LanguageHaskell98

Jukebox.TPTP.Parsec

Documentation

newtype Parsec a b Source #

Constructors

Parsec 

Fields

Instances
Monad (Parsec a) Source # 
Instance details

Defined in Jukebox.TPTP.Parsec

Methods

(>>=) :: Parsec a a0 -> (a0 -> Parsec a b) -> Parsec a b #

(>>) :: Parsec a a0 -> Parsec a b -> Parsec a b #

return :: a0 -> Parsec a a0 #

fail :: String -> Parsec a a0 #

Functor (Parsec a) Source # 
Instance details

Defined in Jukebox.TPTP.Parsec

Methods

fmap :: (a0 -> b) -> Parsec a a0 -> Parsec a b #

(<$) :: a0 -> Parsec a b -> Parsec a a0 #

Applicative (Parsec a) Source # 
Instance details

Defined in Jukebox.TPTP.Parsec

Methods

pure :: a0 -> Parsec a a0 #

(<*>) :: Parsec a (a0 -> b) -> Parsec a a0 -> Parsec a b #

liftA2 :: (a0 -> b -> c) -> Parsec a a0 -> Parsec a b -> Parsec a c #

(*>) :: Parsec a a0 -> Parsec a b -> Parsec a b #

(<*) :: Parsec a a0 -> Parsec a b -> Parsec a a0 #

Alternative (Parsec a) Source # 
Instance details

Defined in Jukebox.TPTP.Parsec

Methods

empty :: Parsec a a0 #

(<|>) :: Parsec a a0 -> Parsec a a0 -> Parsec a a0 #

some :: Parsec a a0 -> Parsec a [a0] #

many :: Parsec a a0 -> Parsec a [a0] #

MonadPlus (Parsec a) Source # 
Instance details

Defined in Jukebox.TPTP.Parsec

Methods

mzero :: Parsec a a0 #

mplus :: Parsec a a0 -> Parsec a a0 -> Parsec a a0 #

type Reply a b = [String] -> Result (Position a) b Source #

data Result a b Source #

Constructors

Ok a b 
Error a String 
Expected a [String] 

nonempty :: Parsec a b -> Parsec a b Source #

skipSome :: Parsec a b -> Parsec a () Source #

skipMany :: Parsec a b -> Parsec a () Source #

(<?>) :: Parsec a b -> String -> Parsec a b infix 0 Source #

between :: Parsec a b -> Parsec a c -> Parsec a d -> Parsec a d Source #

sepBy1 :: Parsec a b -> Parsec a c -> Parsec a [b] Source #

run_ :: Stream a c => Parsec a b -> a -> Result (Position a) b Source #

run :: Stream a c => (Position a -> [String]) -> Parsec a b -> a -> (Position a, Either [String] b) Source #

class Stream a b | a -> b where Source #

Minimal complete definition

primToken, position

Associated Types

type Position a Source #

Methods

primToken :: a -> (a -> b -> c) -> c -> (String -> c) -> c Source #

position :: a -> Position a Source #

Instances
Stream TokenStream Token Source # 
Instance details

Defined in Jukebox.TPTP.Parse.Core

Associated Types

type Position TokenStream :: * Source #

Stream a b => Stream (UserState state a) b Source # 
Instance details

Defined in Jukebox.TPTP.Parsec

Associated Types

type Position (UserState state a) :: * Source #

Methods

primToken :: UserState state a -> (UserState state a -> b -> c) -> c -> (String -> c) -> c Source #

position :: UserState state a -> Position (UserState state a) Source #

next :: Stream a b => Parsec a b Source #

cut :: Stream a b => Parsec a () Source #

cut' :: Stream a b => Parsec a c -> Parsec a c Source #

satisfy :: Stream a b => (b -> Bool) -> Parsec a b Source #

eof :: Stream a b => Parsec a () Source #

data UserState state stream Source #

Constructors

UserState 

Fields

Instances
Stream a b => Stream (UserState state a) b Source # 
Instance details

Defined in Jukebox.TPTP.Parsec

Associated Types

type Position (UserState state a) :: * Source #

Methods

primToken :: UserState state a -> (UserState state a -> b -> c) -> c -> (String -> c) -> c Source #

position :: UserState state a -> Position (UserState state a) Source #

type Position (UserState state a) Source # 
Instance details

Defined in Jukebox.TPTP.Parsec

type Position (UserState state a) = UserState state a

getState :: Parsec (UserState state a) state Source #

putState :: state -> Parsec (UserState state a) () Source #