summaryrefslogtreecommitdiff
path: root/src/Propellor/Types
diff options
context:
space:
mode:
authorJoey Hess2016-03-25 02:00:23 -0400
committerJoey Hess2016-03-25 02:00:23 -0400
commit2506453874aa30968d8533a603d295ac248273c5 (patch)
tree16060cde005ddb6448271b250b16cd7c87954f91 /src/Propellor/Types
parent80ace2f30bea2ed850cf400a85fe68b3784751d2 (diff)
add type alias for Sing to be less confusing for users
Diffstat (limited to 'src/Propellor/Types')
-rw-r--r--src/Propellor/Types/MetaTypes.hs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Propellor/Types/MetaTypes.hs b/src/Propellor/Types/MetaTypes.hs
index 6edea291..7dafe422 100644
--- a/src/Propellor/Types/MetaTypes.hs
+++ b/src/Propellor/Types/MetaTypes.hs
@@ -10,7 +10,7 @@ module Propellor.Types.MetaTypes (
FreeBSD,
HasInfo,
type (+),
- Sing,
+ MetaTypes,
sing,
SingI,
IncludesInfo,
@@ -36,15 +36,17 @@ data OS
deriving (Show, Eq)
-- | Any unix-like system
-type UnixLike = Sing '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish, 'Targeting 'OSFreeBSD ]
-type Debian = Sing '[ 'Targeting 'OSDebian ]
+type UnixLike = MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish, 'Targeting 'OSFreeBSD ]
+type Debian = MetaTypes '[ 'Targeting 'OSDebian ]
+type Buntish = MetaTypes '[ 'Targeting 'OSBuntish ]
+type FreeBSD = MetaTypes '[ 'Targeting 'OSFreeBSD ]
-- | Debian and derivatives.
-type DebianLike = Sing '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish ]
-type Buntish = Sing '[ 'Targeting 'OSBuntish ]
-type FreeBSD = Sing '[ 'Targeting 'OSFreeBSD ]
+type DebianLike = Debian + Buntish
-- | Used to indicate that a Property adds Info to the Host where it's used.
-type HasInfo = Sing '[ 'WithInfo ]
+type HasInfo = MetaTypes '[ 'WithInfo ]
+
+type MetaTypes = Sing
-- | The data family of singleton types.
data family Sing (x :: k)