extensible-0.2.3: Poly-kinded, extensible ADTs

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

Data.Extensible.League

Description

Efficient extensible functor

Synopsis

Documentation

newtype League fs a Source

A much more efficient representation for Union of Functors.

Constructors

League 

Fields

getLeague :: Fuse a :| fs
 

Instances

Functor (League fs)

fast fmap

Typeable ([* -> *] -> * -> *) League 

liftL :: (Functor f, f fs) => f a -> League fs a Source

O(log n) Embed a functor.

newtype Fuse a f Source

Flipped Yoneda

Constructors

Fuse 

Fields

getFuse :: forall b. (a -> b) -> f b
 

meltdown :: Fuse a f -> f a Source

Fuse Fuse to retract a substantial functor.

mapFuse :: (a -> b) -> Fuse a f -> Fuse b f Source

fmap for the content.

(<?~) :: (f x -> a) -> (Match (Fuse x) a :* fs) -> Match (Fuse x) a :* (f : fs) infixr 1 Source

Prepend a clause for Match (Fuse x) as well as (<?!).