extensible-0.3.2: Extensible, efficient, lens-friendly data types

Copyright(c) Fumiaki Kinoshita 2015
LicenseBSD3
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Extensible.Union

Description

Polymorphic open unions

Synopsis

Documentation

newtype K1 a f Source

Wrap a type that has a kind * -> *.

Constructors

K1 

Fields

getK1 :: f a
 

Instances

Typeable (k -> (k -> *) -> *) (K1 k) 
Eq (f a) => Eq (K1 k a f) 
Ord (f a) => Ord (K1 k a f) 
Read (f a) => Read (K1 k a f) 

newtype Union xs a Source

Constructors

Union 

Fields

getUnion :: K1 a :| xs
 

reunion :: (Gondola m :* xs) -> Union xs a -> m a Source

newtype Gondola f g Source

Transformation between effects

Constructors

Gondola 

Fields

runGondola :: forall a. g a -> f a
 

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