arrows-0.4.4.2: Arrow classes and transformers

Copyright(c) Ross Paterson 2003
LicenseBSD-style (see the LICENSE file in the distribution)
MaintainerR.Paterson@city.ac.uk
Stabilityexperimental
Portabilitynon-portable (multi-parameter type classes)
Safe HaskellSafe
LanguageHaskell98

Control.Arrow.Transformer.Static

Description

Arrow transformer adding static information.

Synopsis

Documentation

newtype StaticArrow f a b c Source #

An arrow type that augments the underlying arrow with static information.

Constructors

StaticArrow (f (a b c)) 

Instances

(ArrowError ex a, Applicative f) => ArrowError ex (StaticArrow f a) Source # 

Methods

raise :: StaticArrow f a ex b Source #

handle :: StaticArrow f a e b -> StaticArrow f a (e, ex) b -> StaticArrow f a e b Source #

tryInUnless :: StaticArrow f a e b -> StaticArrow f a (e, b) c -> StaticArrow f a (e, ex) c -> StaticArrow f a e c Source #

newError :: StaticArrow f a e b -> StaticArrow f a e (Either ex b) Source #

(ArrowWriter w a, Applicative f) => ArrowWriter w (StaticArrow f a) Source # 

Methods

write :: StaticArrow f a w () Source #

newWriter :: StaticArrow f a e b -> StaticArrow f a e (b, w) Source #

(ArrowState s a, Applicative f) => ArrowState s (StaticArrow f a) Source # 

Methods

fetch :: StaticArrow f a e s Source #

store :: StaticArrow f a s () Source #

(ArrowReader r a, Applicative f) => ArrowReader r (StaticArrow f a) Source # 

Methods

readState :: StaticArrow f a b r Source #

newReader :: StaticArrow f a e b -> StaticArrow f a (e, r) b Source #

(ArrowAddError ex a a', Applicative f) => ArrowAddError ex (StaticArrow f a) (StaticArrow f a') Source # 

Methods

liftError :: StaticArrow f a' e b -> StaticArrow f a e b Source #

elimError :: StaticArrow f a e b -> StaticArrow f a' (e, ex) b -> StaticArrow f a' e b Source #

(ArrowAddWriter w a a', Applicative f) => ArrowAddWriter w (StaticArrow f a) (StaticArrow f a') Source # 

Methods

liftWriter :: StaticArrow f a' e b -> StaticArrow f a e b Source #

elimWriter :: StaticArrow f a e b -> StaticArrow f a' e (b, w) Source #

(ArrowAddReader r a a', Applicative f) => ArrowAddReader r (StaticArrow f a) (StaticArrow f a') Source # 

Methods

liftReader :: StaticArrow f a' e b -> StaticArrow f a e b Source #

elimReader :: StaticArrow f a e b -> StaticArrow f a' (e, r) b Source #

(ArrowAddState s a a', Applicative f) => ArrowAddState s (StaticArrow f a) (StaticArrow f a') Source # 

Methods

liftState :: StaticArrow f a' e b -> StaticArrow f a e b Source #

elimState :: StaticArrow f a e b -> StaticArrow f a' (e, s) (b, s) Source #

(Arrow a, Applicative f) => ArrowTransformer (StaticArrow f) a Source # 

Methods

lift :: a b c -> StaticArrow f a b c Source #

(Category * a, Applicative f) => Category * (StaticArrow f a) Source # 

Methods

id :: cat a a #

(.) :: cat b c -> cat a b -> cat a c #

(Arrow a, Applicative f) => Arrow (StaticArrow f a) Source # 

Methods

arr :: (b -> c) -> StaticArrow f a b c #

first :: StaticArrow f a b c -> StaticArrow f a (b, d) (c, d) #

second :: StaticArrow f a b c -> StaticArrow f a (d, b) (d, c) #

(***) :: StaticArrow f a b c -> StaticArrow f a b' c' -> StaticArrow f a (b, b') (c, c') #

(&&&) :: StaticArrow f a b c -> StaticArrow f a b c' -> StaticArrow f a b (c, c') #

(ArrowZero a, Applicative f) => ArrowZero (StaticArrow f a) Source # 

Methods

zeroArrow :: StaticArrow f a b c #

(ArrowPlus a, Applicative f) => ArrowPlus (StaticArrow f a) Source # 

Methods

(<+>) :: StaticArrow f a b c -> StaticArrow f a b c -> StaticArrow f a b c #

(ArrowChoice a, Applicative f) => ArrowChoice (StaticArrow f a) Source # 

Methods

left :: StaticArrow f a b c -> StaticArrow f a (Either b d) (Either c d) #

right :: StaticArrow f a b c -> StaticArrow f a (Either d b) (Either d c) #

(+++) :: StaticArrow f a b c -> StaticArrow f a b' c' -> StaticArrow f a (Either b b') (Either c c') #

(|||) :: StaticArrow f a b d -> StaticArrow f a c d -> StaticArrow f a (Either b c) d #

(ArrowLoop a, Applicative f) => ArrowLoop (StaticArrow f a) Source # 

Methods

loop :: StaticArrow f a (b, d) (c, d) -> StaticArrow f a b c #

(ArrowCircuit a, Applicative f) => ArrowCircuit (StaticArrow f a) Source # 

Methods

delay :: b -> StaticArrow f a b b Source #

(ArrowAddStream a a', Applicative f) => ArrowAddStream (StaticArrow f a) (StaticArrow f a') Source # 

Methods

liftStream :: StaticArrow f a' e b -> StaticArrow f a e b Source #

elimStream :: StaticArrow f a (e, b) c -> StaticArrow f a' (e, Stream b) (Stream c) Source #

(Arrow a, Applicative f) => Functor (StaticArrow f a b) Source # 

Methods

fmap :: (a -> b) -> StaticArrow f a b a -> StaticArrow f a b b #

(<$) :: a -> StaticArrow f a b b -> StaticArrow f a b a #

(Arrow a, Applicative f) => Applicative (StaticArrow f a b) Source # 

Methods

pure :: a -> StaticArrow f a b a #

(<*>) :: StaticArrow f a b (a -> b) -> StaticArrow f a b a -> StaticArrow f a b b #

liftA2 :: (a -> b -> c) -> StaticArrow f a b a -> StaticArrow f a b b -> StaticArrow f a b c #

(*>) :: StaticArrow f a b a -> StaticArrow f a b b -> StaticArrow f a b b #

(<*) :: StaticArrow f a b a -> StaticArrow f a b b -> StaticArrow f a b a #

(ArrowPlus a, Applicative f) => Alternative (StaticArrow f a b) Source # 

Methods

empty :: StaticArrow f a b a #

(<|>) :: StaticArrow f a b a -> StaticArrow f a b a -> StaticArrow f a b a #

some :: StaticArrow f a b a -> StaticArrow f a b [a] #

many :: StaticArrow f a b a -> StaticArrow f a b [a] #

(ArrowPlus a, Applicative f) => Semigroup (StaticArrow f a b c) Source # 

Methods

(<>) :: StaticArrow f a b c -> StaticArrow f a b c -> StaticArrow f a b c #

sconcat :: NonEmpty (StaticArrow f a b c) -> StaticArrow f a b c #

stimes :: Integral b => b -> StaticArrow f a b c -> StaticArrow f a b c #

(ArrowPlus a, Applicative f) => Monoid (StaticArrow f a b c) Source # 

Methods

mempty :: StaticArrow f a b c #

mappend :: StaticArrow f a b c -> StaticArrow f a b c -> StaticArrow f a b c #

mconcat :: [StaticArrow f a b c] -> StaticArrow f a b c #

type StaticMonadArrow m = StaticArrow (WrappedMonad m) Source #

A special case is monads applied to the whole arrow, in contrast to Kleisli arrows, in which the monad is applied to the output.

type StaticArrowArrow a s = StaticArrow (WrappedArrow a s) Source #

A special case.

wrap :: (Applicative f, Arrow a) => f (a b c) -> StaticArrow f a b c Source #

unwrap :: (Applicative f, Arrow a) => StaticArrow f a b c -> f (a b c) Source #

wrapA :: (Arrow a, Arrow a') => a s (a' b c) -> StaticArrowArrow a s a' b c Source #

unwrapA :: (Arrow a, Arrow a') => StaticArrowArrow a s a' b c -> a s (a' b c) Source #

wrapM :: (Monad m, Arrow a) => m (a b c) -> StaticMonadArrow m a b c Source #

unwrapM :: (Monad m, Arrow a) => StaticMonadArrow m a b c -> m (a b c) Source #