okapi-0.1.0.1: A microframework based on monadic parsing
Safe HaskellNone
LanguageHaskell2010

Okapi.Type

Documentation

type Path = [Text] Source #

data State Source #

Instances

Instances details
Monad m => MonadState State (OkapiT m) Source # 
Instance details

Defined in Okapi.Type

Methods

get :: OkapiT m State #

put :: State -> OkapiT m () #

state :: (State -> (a, State)) -> OkapiT m a #

data File Source #

Constructors

File 

data Failure Source #

Constructors

Skip 
Error Response 

Instances

Instances details
Monad m => MonadError Failure (OkapiT m) Source # 
Instance details

Defined in Okapi.Type

Methods

throwError :: Failure -> OkapiT m a #

catchError :: OkapiT m a -> (Failure -> OkapiT m a) -> OkapiT m a #

newtype OkapiT m a Source #

Constructors

OkapiT 

Instances

Instances details
MonadTrans OkapiT Source # 
Instance details

Defined in Okapi.Type

Methods

lift :: Monad m => m a -> OkapiT m a #

Monad m => MonadState State (OkapiT m) Source # 
Instance details

Defined in Okapi.Type

Methods

get :: OkapiT m State #

put :: State -> OkapiT m () #

state :: (State -> (a, State)) -> OkapiT m a #

MonadReader r m => MonadReader r (OkapiT m) Source # 
Instance details

Defined in Okapi.Type

Methods

ask :: OkapiT m r #

local :: (r -> r) -> OkapiT m a -> OkapiT m a #

reader :: (r -> a) -> OkapiT m a #

Monad m => MonadError Failure (OkapiT m) Source # 
Instance details

Defined in Okapi.Type

Methods

throwError :: Failure -> OkapiT m a #

catchError :: OkapiT m a -> (Failure -> OkapiT m a) -> OkapiT m a #

Monad m => Monad (OkapiT m) Source # 
Instance details

Defined in Okapi.Type

Methods

(>>=) :: OkapiT m a -> (a -> OkapiT m b) -> OkapiT m b #

(>>) :: OkapiT m a -> OkapiT m b -> OkapiT m b #

return :: a -> OkapiT m a #

Functor m => Functor (OkapiT m) Source # 
Instance details

Defined in Okapi.Type

Methods

fmap :: (a -> b) -> OkapiT m a -> OkapiT m b #

(<$) :: a -> OkapiT m b -> OkapiT m a #

Monad m => Applicative (OkapiT m) Source # 
Instance details

Defined in Okapi.Type

Methods

pure :: a -> OkapiT m a #

(<*>) :: OkapiT m (a -> b) -> OkapiT m a -> OkapiT m b #

liftA2 :: (a -> b -> c) -> OkapiT m a -> OkapiT m b -> OkapiT m c #

(*>) :: OkapiT m a -> OkapiT m b -> OkapiT m b #

(<*) :: OkapiT m a -> OkapiT m b -> OkapiT m a #

Monad m => Alternative (OkapiT m) Source # 
Instance details

Defined in Okapi.Type

Methods

empty :: OkapiT m a #

(<|>) :: OkapiT m a -> OkapiT m a -> OkapiT m a #

some :: OkapiT m a -> OkapiT m [a] #

many :: OkapiT m a -> OkapiT m [a] #

Monad m => MonadPlus (OkapiT m) Source # 
Instance details

Defined in Okapi.Type

Methods

mzero :: OkapiT m a #

mplus :: OkapiT m a -> OkapiT m a -> OkapiT m a #

MonadIO m => MonadIO (OkapiT m) Source # 
Instance details

Defined in Okapi.Type

Methods

liftIO :: IO a -> OkapiT m a #

MFunctor OkapiT Source # 
Instance details

Defined in Okapi.Type

Methods

hoist :: forall m n (b :: k). Monad m => (forall a. m a -> n a) -> OkapiT m b -> OkapiT n b #