Copyright | (c) Lars Brünjes, 2016 |
---|---|
License | MIT |
Maintainer | brunjlar@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Extensions |
|
This module defines utility functions for arrows.
Documentation
class Arrow a => ArrowConvolve a where Source #
Arrows implementing ArrowConvolve
can be mapped over containers.
This means that every functor (f :: Hask -> Hask
) lifts to a functor (a -> a
).
Instances should satisfy the following laws:
convolve id = id
convolve (g . h) = convolve g . convolve h
convolve . arr = arr . fmap
ArrowConvolve (ParamFun s t) Source # | |
fmapArr :: Arrow a => (c -> d) -> a b c -> a b d Source #
A function suitable to define the canonical Functor
instance for arrows.
pureArr :: Arrow a => c -> a b c Source #
A function to define pure
for arrows.
Combining this with apArr
, the canonical Applicative
instance for arrows can easily be defined.
apArr :: Arrow a => a b (c -> d) -> a b c -> a b d Source #
A function to define (
for arrows.
Combining this with <*>
)pureArr
, the canonical Applicative
instance for arrows can easily be defined.
dimapArr :: Arrow a => (b -> c) -> (d -> e) -> a c d -> a b e Source #
A function suitable to define the canonical Profunctor
instance for arrows.