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 => xs :& Membership ys
- shrink :: xs ⊆ ys => (ys :& h) -> xs :& h
- spread :: xs ⊆ ys => (xs :/ h) -> ys :/ h
- 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 => xs :& Membership ys
- shrinkAssoc :: IncludeAssoc ys xs => (ys :& h) -> xs :& h
- spreadAssoc :: IncludeAssoc ys xs => (xs :/ h) -> ys :/ h
Inclusion
inclusion :: forall xs ys. Include ys xs => xs :& Membership ys 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) = Lookup xs k v |
inclusionAssoc :: forall xs ys. IncludeAssoc ys xs => xs :& Membership ys Source #
Reify the inclusion of type level sets.
shrinkAssoc :: IncludeAssoc ys xs => (ys :& h) -> xs :& h Source #
O(n) Select some elements.
spreadAssoc :: IncludeAssoc ys xs => (xs :/ h) -> ys :/ h Source #
O(1) Embed to a larger union.