| Copyright | (c) Fumiaki Kinoshita 2015 |
|---|---|
| License | BSD3 |
| Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Extensible.Union
Description
Polymorphic open unions
- newtype K1 a f = K1 {
- getK1 :: f a
- newtype Union xs a = Union {}
- reunion :: (Gondola m :* xs) -> Union xs a -> m a
- newtype Gondola f g = Gondola {
- runGondola :: forall a. g a -> f a
- rung :: (forall x. f x -> g x) -> (Gondola g :* fs) -> Gondola g :* (f : fs)
- runGondolas :: x ∈ xs => (Gondola f :* xs) -> x a -> f a
Documentation
Wrap a type that has a kind * -> *.
Transformation between effects
Constructors
| Gondola | |
Fields
| |
rung :: (forall x. f x -> g x) -> (Gondola g :* fs) -> Gondola g :* (f : fs) infixr 0 Source
Add a new transformation.
runGondolas :: x ∈ xs => (Gondola f :* xs) -> x a -> f a Source