From 500635568514bc106597a857c60d268dcf668037 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 27 Mar 2016 18:32:01 -0400 Subject: split out singletons lib --- src/Propellor/Types/MetaTypes.hs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/Propellor/Types/MetaTypes.hs') diff --git a/src/Propellor/Types/MetaTypes.hs b/src/Propellor/Types/MetaTypes.hs index 3e89e28d..39d6e725 100644 --- a/src/Propellor/Types/MetaTypes.hs +++ b/src/Propellor/Types/MetaTypes.hs @@ -25,6 +25,7 @@ module Propellor.Types.MetaTypes ( EqT, ) where +import Propellor.Types.Singletons import Propellor.Types.OS data MetaType @@ -49,13 +50,6 @@ type instance IncludesInfo (MetaTypes l) = Elem 'WithInfo l type MetaTypes = Sing --- | The data family of singleton types. -data family Sing (x :: k) - --- | A class used to pass singleton values implicitly. -class SingI t where - sing :: Sing t - -- This boilerplatw would not be needed if the singletons library were -- used. However, we're targeting too old a version of ghc to use it yet. data instance Sing (x :: MetaType) where @@ -68,12 +62,6 @@ instance SingI ('Targeting 'OSBuntish) where sing = OSBuntishS instance SingI ('Targeting 'OSFreeBSD) where sing = OSFreeBSDS instance SingI 'WithInfo where sing = WithInfoS -data instance Sing (x :: [k]) where - Nil :: Sing '[] - Cons :: Sing x -> Sing xs -> Sing (x ': xs) -instance (SingI x, SingI xs) => SingI (x ': xs) where sing = Cons sing sing -instance SingI '[] where sing = Nil - -- | Convenience type operator to combine two `MetaTypes` lists. -- -- For example: -- cgit v1.2.3