SimpleH-1.2: A light, clean and powerful Haskell utility library

Safe HaskellNone

Algebra.Arrow

Documentation

class (Split k, Choice k) => Arrow k whereSource

Methods

arr :: (a -> b) -> k a bSource

Instances

Arrow (->) 
Monad m => Arrow (Kleisli m) 
Monad m => Arrow (StateA m) 
Arrow k => Arrow (ListA k) 
(Monoid w, Monad m) => Arrow (ParserA w m) 

(>>^) :: Functor f => f a -> (a -> b) -> f bSource

(^>>) :: Cofunctor (Flip f c) => (a -> b) -> f b c -> f a cSource

class Arrow k => Apply k whereSource

Methods

apply :: k (k a b, a) bSource

Instances

Apply (->) 
Monad m => Apply (Kleisli m) 

comapA :: Arrow arr => (a -> b) -> Flip arr c b -> Flip arr c aSource

app :: Apply k => k a b -> k a bSource

dup :: Arrow arr => arr a (a, a)Source

newtype Kleisli m a b Source

Constructors

Kleisli 

Fields

runKleisli :: a -> m b
 

Instances

Monad m => Split (Kleisli m) 
Monad m => Choice (Kleisli m) 
Monad m => Category (Kleisli m) 
Monad m => Apply (Kleisli m) 
Monad m => Arrow (Kleisli m) 
Isomorphic (a -> m b) (c -> m' d) (Kleisli m a b) (Kleisli m' c d) 

newtype ListA k a b Source

Constructors

ListA 

Fields

runListA :: k [a] [b]
 

Instances

Arrow k => Split (ListA k) 
Arrow k => Choice (ListA k) 
Category k => Category (ListA k) 
Arrow k => Arrow (ListA k)