| Portability | GHC |
|---|---|
| Stability | experimental |
| Maintainer | chrisdone@gmail.com |
| Safe Haskell | None |
Formatting.Holey
Contents
Description
Copy of the holey monoids library but with constructor exported.
- type Format a = forall r. Holey Builder r (a -> r)
- type Holey m r a = HoleyT r a m
- newtype HoleyT r a m = Holey {
- runHM :: (m -> r) -> a
- (%) :: Monoid n => Holey n b c -> Holey n b1 b -> Holey n b1 c
- (%.) :: Holey m r (a -> b) -> Holey a b c -> Holey m r c
- now :: m -> Holey m r r
- bind :: Holey m b c -> (m -> Holey n a b) -> Holey n a c
- later :: (a -> m) -> Holey m r (a -> r)
Formatting library
The type of a monoid with holes. The underlying monoid is
represented by type parameter m. The r is the result type and
stays polymorphic until the very last moment when run is
called. The last argument a is always a function with zero or
more arguments, finally resulting in r. Ordering the arguments in
this order allows holey monoids to be composed using ., stacking
the expected arguments. Note that the Monoid constraint is only
used in the identity Holey and in composing two Holeys.
(%) :: Monoid n => Holey n b c -> Holey n b1 b -> Holey n b1 cSource
Composition operator. The same as category composition.
(%.) :: Holey m r (a -> b) -> Holey a b c -> Holey m r cSource
Function compose two holeys. Will feed the result of one holey into another.