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

Copyright(c) Fumiaki Kinoshita 2015
LicenseBSD3
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
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

Wrapper (k -> *) (K1 k a) Source 
Eq (f a) => Eq (K1 k a f) Source 
Ord (f a) => Ord (K1 k a f) Source 
Read (f a) => Read (K1 k a f) Source 
type Repr (k -> *) (K1 k a) f = f a Source 

newtype Union xs a Source

Constructors

Union 

Fields

getUnion :: K1 a :| xs
 

newtype Gondola f g Source

Transformation between effects

Constructors

Gondola 

Fields

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

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

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