arrows-0.4.4.2: Arrow classes and transformers

Copyright | (c) Ross Paterson 2003
License | BSD-style (see the LICENSE file in the distribution)
Maintainer | R.Paterson@city.ac.uk
Stability | experimental
Portability | non-portable (multi-parameter type classes)
Safe Haskell | Safe-Inferred
Language | Haskell98

Control.Arrow.Transformer.Static

Description

Arrow transformer adding static information.

Synopsis

- newtype StaticArrow (f :: Type -> Type) (a :: Type -> Type -> Type) b c = StaticArrow (f (a b c))
- type StaticMonadArrow (m :: Type -> Type) = StaticArrow (WrappedMonad m)
- type StaticArrowArrow (a :: Type -> Type -> Type) s = StaticArrow (WrappedArrow a s)
- wrap :: (Applicative f, Arrow a) => f (a b c) -> StaticArrow f a b c
- unwrap :: (Applicative f, Arrow a) => StaticArrow f a b c -> f (a b c)
- wrapA :: (Arrow a, Arrow a') => a s (a' b c) -> StaticArrowArrow a s a' b c
- unwrapA :: (Arrow a, Arrow a') => StaticArrowArrow a s a' b c -> a s (a' b c)
- wrapM :: (Monad m, Arrow a) => m (a b c) -> StaticMonadArrow m a b c
- unwrapM :: (Monad m, Arrow a) => StaticMonadArrow m a b c -> m (a b c)

# Documentation

newtype StaticArrow (f :: Type -> Type) (a :: Type -> Type -> Type) b c Source #

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

Constructors

StaticArrow (f (a b c)) |

#### Instances

Instances details

(ArrowError ex a, Applicative f) => ArrowError ex (StaticArrow f a) Source # |
Instance details Defined in Control.Arrow.Transformer.Static 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 #
(ArrowReader r a, Applicative f) => ArrowReader r (StaticArrow f a) Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods readState :: StaticArrow f a b r Source # newReader :: StaticArrow f a e b -> StaticArrow f a (e, r) b Source #
(ArrowState s a, Applicative f) => ArrowState s (StaticArrow f a) Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods fetch :: StaticArrow f a e s Source # store :: StaticArrow f a s () Source #
(ArrowWriter w a, Applicative f) => ArrowWriter w (StaticArrow f a) Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods write :: StaticArrow f a w () Source # newWriter :: StaticArrow f a e b -> StaticArrow f a e (b, w) Source #
(Category a, Applicative f) => Category (StaticArrow f a :: Type -> Type -> Type) Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods id :: StaticArrow f a a0 a0 Source # (.) :: StaticArrow f a b c -> StaticArrow f a a0 b -> StaticArrow f a a0 c Source #
(ArrowAddError ex a a', Applicative f) => ArrowAddError ex (StaticArrow f a) (StaticArrow f a') Source # |
Instance details Defined in Control.Arrow.Transformer.Static 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 #
(ArrowAddReader r a a', Applicative f) => ArrowAddReader r (StaticArrow f a) (StaticArrow f a') Source # |
Instance details Defined in Control.Arrow.Transformer.Static 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 # |
Instance details Defined in Control.Arrow.Transformer.Static 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 #
(ArrowAddWriter w a a', Applicative f) => ArrowAddWriter w (StaticArrow f a) (StaticArrow f a') Source # |
Instance details Defined in Control.Arrow.Transformer.Static 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 #
(Arrow a, Applicative f) => ArrowTransformer (StaticArrow f) a Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods lift :: a b c -> StaticArrow f a b c Source #
(ArrowCircuit a, Applicative f) => ArrowCircuit (StaticArrow f a) Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods delay :: b -> StaticArrow f a b b Source #
(Arrow a, Applicative f) => Arrow (StaticArrow f a) Source # |

Instance details

Defined in Control.Arrow.Transformer.Static

Methods

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

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

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

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

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

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

Instance details

Defined in Control.Arrow.Transformer.Static

Methods

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

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

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

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

(ArrowLoop a, Applicative f) => ArrowLoop (StaticArrow f a) Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods loop :: StaticArrow f a (b, d) (c, d) -> StaticArrow f a b c Source #
(ArrowPlus a, Applicative f) => ArrowPlus (StaticArrow f a) Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods (<+>) :: StaticArrow f a b c -> StaticArrow f a b c -> StaticArrow f a b c Source #
(ArrowZero a, Applicative f) => ArrowZero (StaticArrow f a) Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods zeroArrow :: StaticArrow f a b c Source #
(ArrowAddStream a a', Applicative f) => ArrowAddStream (StaticArrow f a) (StaticArrow f a') Source # |
Instance details Defined in Control.Arrow.Transformer.Static 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 #
(ArrowPlus a, Applicative f) => Alternative (StaticArrow f a b) Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods empty :: StaticArrow f a b a0 Source # (<|>) :: StaticArrow f a b a0 -> StaticArrow f a b a0 -> StaticArrow f a b a0 Source # some :: StaticArrow f a b a0 -> StaticArrow f a b [a0] Source # many :: StaticArrow f a b a0 -> StaticArrow f a b [a0] Source #
(Arrow a, Applicative f) => Applicative (StaticArrow f a b) Source # |

Instance details

Defined in Control.Arrow.Transformer.Static

Methods

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

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

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

(*>) :: StaticArrow f a b a0 -> StaticArrow f a b b0 -> StaticArrow f a b b0 Source #

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

(Arrow a, Applicative f) => Functor (StaticArrow f a b) Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods fmap :: (a0 -> b0) -> StaticArrow f a b a0 -> StaticArrow f a b b0 Source # (<$) :: a0 -> StaticArrow f a b b0 -> StaticArrow f a b a0 Source #
(ArrowPlus a, Applicative f) => Monoid (StaticArrow f a b c) Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods mempty :: StaticArrow f a b c Source # mappend :: StaticArrow f a b c -> StaticArrow f a b c -> StaticArrow f a b c Source # mconcat :: [StaticArrow f a b c] -> StaticArrow f a b c Source #
(ArrowPlus a, Applicative f) => Semigroup (StaticArrow f a b c) Source # |
Instance details Defined in Control.Arrow.Transformer.Static Methods (<>) :: StaticArrow f a b c -> StaticArrow f a b c -> StaticArrow f a b c Source # sconcat :: NonEmpty (StaticArrow f a b c) -> StaticArrow f a b c Source # stimes :: Integral b0 => b0 -> StaticArrow f a b c -> StaticArrow f a b c Source #

type StaticMonadArrow (m :: Type -> Type) = 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 :: Type -> Type -> Type) 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 #