Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Simple implementation of singletons, portable back to ghc 7.6.3
Documentation
data family Sing (x :: k) Source #
The data family of singleton types.
SingI k metatypes => Semigroup (Property (MetaTypes k metatypes)) # | Any type of Property is a Semigroup. When properties x and y are appended together, the resulting property has a description like "x and y". Note that when x fails to be ensured, it will not try to ensure y. |
SingI k metatypes => Monoid (Property (MetaTypes k metatypes)) # | Any type of Property is a Monoid. |
((~) CheckCombine (CheckCombinable a x y) CanCombine, SingI [a] (Combine a x y)) => Combines (Property (MetaTypes [a] x)) (Property (MetaTypes [a] y)) Source # | |
((~) CheckCombine (CheckCombinable a x y) CanCombine, SingI [a] (Combine a x y)) => Combines (Property (MetaTypes [a] x)) (RevertableProperty (MetaTypes [a] y) (MetaTypes k y')) Source # | |
(Semigroup (Property (MetaTypes k2 setupmetatypes)), Semigroup (Property (MetaTypes k1 undometatypes)), SingI k2 setupmetatypes, SingI k1 undometatypes) => Semigroup (RevertableProperty (MetaTypes k2 setupmetatypes) (MetaTypes k1 undometatypes)) # | Any type of RevertableProperty is a Semigroup. When revertable properties x and y are appended together, the resulting revertable property has a description like "x and y". Note that when x fails to be ensured, it will not try to ensure y. |
(Monoid (Property (MetaTypes k2 setupmetatypes)), Monoid (Property (MetaTypes k1 undometatypes)), SingI k2 setupmetatypes, SingI k1 undometatypes) => Monoid (RevertableProperty (MetaTypes k2 setupmetatypes) (MetaTypes k1 undometatypes)) # | |
((~) CheckCombine (CheckCombinable a x y) CanCombine, SingI [a] (Combine a x y)) => Combines (RevertableProperty (MetaTypes [a] x) (MetaTypes k x')) (Property (MetaTypes [a] y)) Source # | |
((~) CheckCombine (CheckCombinable a2 x y) CanCombine, (~) CheckCombine (CheckCombinable a1 x' y') CanCombine, SingI [a2] (Combine a2 x y), SingI [a1] (Combine a1 x' y')) => Combines (RevertableProperty (MetaTypes [a2] x) (MetaTypes [a1] x')) (RevertableProperty (MetaTypes [a2] y) (MetaTypes [a1] y')) Source # | |
data Sing Bool Source # | |
data Sing MetaType Source # | |
data Sing [k] Source # | |
type CombinedType (Property (MetaTypes [a] x)) (Property (MetaTypes [a] y)) Source # | |
type CombinedType (Property (MetaTypes [a] x)) (RevertableProperty (MetaTypes [a] y) (MetaTypes k y')) Source # | |
type (+) * (MetaTypes [a1] a2) (MetaTypes [a1] b) Source # | |
type IncludesInfo (MetaTypes [MetaType] l) Source # | |
type CombinedType (RevertableProperty (MetaTypes [a] x) (MetaTypes k x')) (Property (MetaTypes [a] y)) Source # | |
type CombinedType (RevertableProperty (MetaTypes [a2] x) (MetaTypes [a1] x')) (RevertableProperty (MetaTypes [a2] y) (MetaTypes [a1] y')) Source # | |
A class used to pass singleton values implicitly.
SingI Bool False Source # | |
SingI Bool True Source # | |
SingI MetaType WithInfo Source # | |
SingI MetaType (Targeting OSDebian) Source # | |
SingI MetaType (Targeting OSBuntish) Source # | |
SingI MetaType (Targeting OSArchLinux) Source # | |
SingI MetaType (Targeting OSFreeBSD) Source # | |
SingI [k] ([] k) Source # | |
(SingI a x, SingI [a] xs) => SingI [a] ((:) a x xs) Source # | |