definitive-base-2.6.3: A small Prelude wrapper to simplify my own Haskell developments

Safe HaskellNone
LanguageHaskell2010

Algebra.Arrow

Documentation

class (Split k, Choice k) => Arrow k where Source #

Minimal complete definition

arr

Methods

arr :: (a -> b) -> k a b Source #

Instances

Arrow (->) Source # 

Methods

arr :: (a -> b) -> a -> b Source #

Monad m => Arrow (Kleisli m) Source # 

Methods

arr :: (a -> b) -> Kleisli m a b Source #

Monad m => Arrow (StateA m) Source # 

Methods

arr :: (a -> b) -> StateA m a b Source #

Arrow k => Arrow (ListA k) Source # 

Methods

arr :: (a -> b) -> ListA k a b Source #

(>>^) :: Functor f => f a -> (a -> b) -> f b infixr 4 Source #

(^>>) :: Cofunctor (Flip f c) => (a -> b) -> f b c -> f a c infixr 4 Source #

class Arrow k => Apply k where Source #

Minimal complete definition

apply

Methods

apply :: k (k a b, a) b Source #

Instances

Apply (->) Source # 

Methods

apply :: (a -> b, a) -> b Source #

Monad m => Apply (Kleisli m) Source # 

Methods

apply :: Kleisli m (Kleisli m a b, a) b Source #

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

app :: Apply k => k a b -> k a b Source #

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

newtype Kleisli m a b Source #

Constructors

Kleisli 

Fields

Instances

Monad m => Split (Kleisli m) Source # 

Methods

(<#>) :: Kleisli m a c -> Kleisli m b d -> Kleisli m (a, b) (c, d) Source #

Monad m => Choice (Kleisli m) Source # 

Methods

(<|>) :: Kleisli m a c -> Kleisli m b c -> Kleisli m (a :+: b) c Source #

Monad m => Category (Kleisli m) Source # 

Methods

id :: Kleisli m a a Source #

Monad m => Deductive (Kleisli m) Source # 

Methods

(.) :: Kleisli m b c -> Kleisli m a b -> Kleisli m a c Source #

Monad m => Apply (Kleisli m) Source # 

Methods

apply :: Kleisli m (Kleisli m a b, a) b Source #

Monad m => Arrow (Kleisli m) Source # 

Methods

arr :: (a -> b) -> Kleisli m a b Source #

Functor f => Functor (Kleisli f a) Source # 

Methods

map :: (a -> b) -> Kleisli f a a -> Kleisli f a b Source #

Contravariant f => Contravariant (Kleisli f a) Source # 

Methods

collect :: Functor f => f (Kleisli f a a) -> Kleisli f a (f a) Source #

Isomorphic (a -> m b) (c -> m' d) (Kleisli m a b) (Kleisli m' c d) Source # 

Methods

i'_ :: Iso (Kleisli m' c d) (Kleisli m a b) (c -> m' d) (a -> m b) Source #

newtype ListA k a b Source #

Constructors

ListA 

Fields

Instances

Arrow k => Split (ListA k) Source # 

Methods

(<#>) :: ListA k a c -> ListA k b d -> ListA k (a, b) (c, d) Source #

Arrow k => Choice (ListA k) Source # 

Methods

(<|>) :: ListA k a c -> ListA k b c -> ListA k (a :+: b) c Source #

Category k => Category (ListA k) Source # 

Methods

id :: ListA k a a Source #

Deductive k => Deductive (ListA k) Source # 

Methods

(.) :: ListA k b c -> ListA k a b -> ListA k a c Source #

Arrow k => Arrow (ListA k) Source # 

Methods

arr :: (a -> b) -> ListA k a b Source #