extensible-0.3.7: Extensible, efficient, optics-friendly data types

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

Data.Extensible.Inclusion

Contents

Description

 

Synopsis

Inclusion

type (⊆) xs ys = Include ys xs Source

Unicode alias for Include

type Include ys = Forall (Member ys) Source

ys contains xs

inclusion :: forall xs ys. Include ys xs => Membership ys :* xs Source

Reify the inclusion of type level sets.

shrink :: xs ys => (h :* ys) -> h :* xs Source

O(m log n) Select some elements.

spread :: xs ys => (h :| xs) -> h :| ys Source

O(log n) Embed to a larger union.

Key-value

type IncludeAssoc ys = Forall (Associated ys) Source

Similar to Include, but this focuses on keys.

class Associated xs t Source

Minimal complete definition

getAssociation

Instances

Associate k k1 k2 v xs => Associated (Assoc k k) xs ((:>) k k k v) Source 

inclusionAssoc :: forall xs ys. IncludeAssoc ys xs => Membership ys :* xs Source

Reify the inclusion of type level sets.

shrinkAssoc :: IncludeAssoc ys xs => (h :* ys) -> h :* xs Source

O(m log n) Select some elements.

spreadAssoc :: IncludeAssoc ys xs => (h :| xs) -> h :| ys Source

O(log n) Embed to a larger union.