|author||Joey Hess||2018-05-18 10:31:18 -0400|
|committer||Joey Hess||2018-05-18 10:40:13 -0400|
modernized and simplified the MetaTypes implementation
now that compatability with ghc 7 is no longer needed. Data.Type.Bool contains effectively the same stuff that was implemented here, so removed my code. Tried to use Data.Type.Equality instead of my EqT, but it seems to be some other type of (type level) equality, and didn't compile. Instead went with the simpler EqT implementation that newer ghc versions allow. The rest of the changes are simply better syntax for defining type families. And upon using that syntax, ghc noticed that `type family a + b` does not have kind "ab" like I wrote before, but is kind *. Tested on debian stable with ghc 8.0.1. This commit was sponsored by John Pellman on Patreon.
Diffstat (limited to 'src/Propellor/PropAccum.hs')
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Propellor/PropAccum.hs b/src/Propellor/PropAccum.hs
index 5d1d3afb..c60ced73 100644
@@ -41,9 +41,9 @@ infixl 1 &
infixl 1 &^
infixl 1 !
-type family GetMetaTypes x
-type instance GetMetaTypes (Property (MetaTypes t)) = MetaTypes t
-type instance GetMetaTypes (RevertableProperty (MetaTypes t) undo) = MetaTypes t
+type family GetMetaTypes x where
+ GetMetaTypes (Property (MetaTypes t)) = MetaTypes t
+ GetMetaTypes (RevertableProperty (MetaTypes t) undo) = MetaTypes t
-- | Adds a property to a Props.