Copyright | (c) Fumiaki Kinoshita 2018 |
---|---|

License | BSD3 |

Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |

Safe Haskell | None |

Language | Haskell2010 |

## Synopsis

- type (⊆) xs ys = Include ys xs
- type Include ys = Forall (Member ys)
- inclusion :: forall xs ys. Include ys xs => Membership ys :* xs
- shrink :: xs ⊆ ys => (h :* ys) -> h :* xs
- spread :: xs ⊆ ys => (h :| xs) -> h :| ys
- type IncludeAssoc ys = Forall (Associated ys)
- class Associated' xs t => Associated xs t
- type family Associated' (xs :: [Assoc k v]) (t :: Assoc k v) :: Constraint where ...
- inclusionAssoc :: forall xs ys. IncludeAssoc ys xs => Membership ys :* xs
- shrinkAssoc :: IncludeAssoc ys xs => (h :* ys) -> h :* xs
- spreadAssoc :: IncludeAssoc ys xs => (h :| xs) -> h :| ys

# Inclusion

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

Reify the inclusion of type level sets.

# Key-value

type IncludeAssoc ys = Forall (Associated ys) Source #

Similar to `Include`

, but this focuses on keys.

class Associated' xs t => Associated xs t Source #

is equivalent to `Associated`

xs (k ':> v)`Associate`

k v xs

getAssociation

## Instances

(Associated' xs t, t ~ (k2 :> v2)) => Associated (xs :: [Assoc k1 v1]) (t :: Assoc k1 v1) Source # | |

Defined in Data.Extensible.Inclusion getAssociation :: Membership xs t |

type family Associated' (xs :: [Assoc k v]) (t :: Assoc k v) :: Constraint where ... Source #

Associated' xs (k :> v) = Associate k v xs |

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(n)* Select some elements.

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

*O(1)* Embed to a larger union.