Copyright | (C) 2012 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | provisional |
Portability | GADTs, Rank2Types |
Safe Haskell | Safe |
Language | Haskell2010 |
Final encoding of free Alternative
functors.
Documentation
The free Alternative
for a Functor
f
.
Alt | |
|
runAlt :: forall f g a. Alternative g => (forall x. f x -> g x) -> Alt f a -> g a Source
Given a natural transformation from f
to g
, this gives a canonical monoidal natural transformation from
to Alt
fg
.