Safe Haskell | None |
---|---|
Language | Haskell98 |
- data MetaType
- type UnixLike = MetaTypes `[Targeting OSDebian, Targeting OSBuntish, Targeting OSFreeBSD]`
- type Linux = MetaTypes `[Targeting OSDebian, Targeting OSBuntish]`
- type DebianLike = MetaTypes `[Targeting OSDebian, Targeting OSBuntish]`
- type Debian = MetaTypes `[Targeting OSDebian]`
- type Buntish = MetaTypes `[Targeting OSBuntish]`
- type FreeBSD = MetaTypes `[Targeting OSFreeBSD]`
- type HasInfo = MetaTypes `[WithInfo]`
- type MetaTypes = Sing
- type family a + b :: ab
- class SingI t where
- type family IncludesInfo t :: Bool
- type family Targets l :: [a]
- type family NonTargets l :: [a]
- type family NotSuperset superset subset :: CheckCombine
- type family Combine list1 list2 :: [a]
- data CheckCombine
- type family CheckCombinable list1 list2 :: CheckCombine
- type family a && b :: Bool
- type family Not a :: Bool
- type family EqT a b :: Bool
- type family Union list1 list2 :: [a]
Documentation
Eq MetaType Source | |
Ord MetaType Source | |
Show MetaType Source | |
SingI MetaType WithInfo Source | |
SingKind MetaType (KProxy MetaType) Source | |
SingI MetaType (Targeting OSDebian) Source | |
SingI MetaType (Targeting OSBuntish) Source | |
SingI MetaType (Targeting OSFreeBSD) Source | |
data Sing MetaType where Source | |
type EqT MetaType WithInfo WithInfo = True Source | |
type EqT MetaType WithInfo (Targeting b) = False Source | |
type DemoteRep MetaType (KProxy MetaType) = MetaType Source | |
type EqT MetaType (Targeting a) WithInfo = False Source | |
type EqT MetaType (Targeting a) (Targeting b) = EqT TargetOS a b Source | |
type IncludesInfo (MetaTypes [MetaType] l) Source |
type UnixLike = MetaTypes `[Targeting OSDebian, Targeting OSBuntish, Targeting OSFreeBSD]` Source
Any unix-like system
type DebianLike = MetaTypes `[Targeting OSDebian, Targeting OSBuntish]` Source
Debian and derivatives.
type HasInfo = MetaTypes `[WithInfo]` Source
Used to indicate that a Property adds Info to the Host where it's used.
type family a + b :: ab Source
Convenience type operator to combine two MetaTypes
lists.
For example:
HasInfo + Debian
Which is shorthand for this type:
MetaTypes '[WithInfo, Targeting OSDebian]
A class used to pass singleton values implicitly.
type family IncludesInfo t :: Bool Source
type IncludesInfo (MetaTypes [MetaType] l) Source |
type family NonTargets l :: [a] Source
type NonTargets k ([] k) = [] k Source | |
type NonTargets k ((:) k x xs) Source |
type family NotSuperset superset subset :: CheckCombine Source
Every item in the subset must be in the superset.
The name of this was chosen to make type errors more understandable.
type NotSuperset k superset ([] k) = CanCombine Source | |
type NotSuperset k superset ((:) k s rest) Source |
type family Combine list1 list2 :: [a] Source
Combine two MetaTypes lists, yielding a list that has targets present in both, and nontargets present in either.
type family CheckCombinable list1 list2 :: CheckCombine Source
Checks if two MetaTypes lists can be safely combined.
This should be used anywhere Combine is used, as an additional constraint. For example:
foo :: (CheckCombinable x y ~ 'CanCombine) => x -> y -> Combine x y
type CheckCombinable k list1 ([] k) = CanCombine Source | |
type CheckCombinable k ([] k) list2 = CanCombine Source | |
type CheckCombinable k ((:) k l1 list1) ((:) k l2 list2) Source |
type family EqT a b :: Bool Source
Type level equality
This is a very clumsy implmentation, but it works back to ghc 7.6.
type EqT TargetOS OSDebian OSDebian = True Source | |
type EqT TargetOS OSDebian OSBuntish = False Source | |
type EqT TargetOS OSDebian OSFreeBSD = False Source | |
type EqT TargetOS OSBuntish OSDebian = False Source | |
type EqT TargetOS OSBuntish OSBuntish = True Source | |
type EqT TargetOS OSBuntish OSFreeBSD = False Source | |
type EqT TargetOS OSFreeBSD OSDebian = False Source | |
type EqT TargetOS OSFreeBSD OSBuntish = False Source | |
type EqT TargetOS OSFreeBSD OSFreeBSD = True Source | |
type EqT MetaType WithInfo WithInfo = True Source | |
type EqT MetaType WithInfo (Targeting b) = False Source | |
type EqT MetaType (Targeting a) WithInfo = False Source | |
type EqT MetaType (Targeting a) (Targeting b) = EqT TargetOS a b Source |