Implict quantifications will give an error from ghc 7.12

Signed-off-by: Bhimanavajjula Aditya <[email protected]>
---
 src/Ganeti/Query/Filter.hs | 2 +-
 src/Ganeti/THH.hs          | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/Ganeti/Query/Filter.hs b/src/Ganeti/Query/Filter.hs
index b7df4c4..aaae425 100644
--- a/src/Ganeti/Query/Filter.hs
+++ b/src/Ganeti/Query/Filter.hs
@@ -136,7 +136,7 @@ trueFilter v = Bad . ParameterError $
 -- | A type synonim for a rank-2 comparator function. This is used so
 -- that we can pass the usual '<=', '>', '==' functions to 'binOpFilter'
 -- and for them to be used in multiple contexts.
-type Comparator = (Eq a, Ord a) => a -> a -> Bool
+type Comparator = forall a . (Eq a, Ord a) => a -> a -> Bool
 
 -- | Equality checker.
 --
diff --git a/src/Ganeti/THH.hs b/src/Ganeti/THH.hs
index 5d4748a..5374ba6 100644
--- a/src/Ganeti/THH.hs
+++ b/src/Ganeti/THH.hs
@@ -1,4 +1,5 @@
-{-# LANGUAGE ParallelListComp, TemplateHaskell, CPP #-}
+{-# LANGUAGE ParallelListComp, TemplateHaskell, CPP,
+    RankNTypes #-}
 
 {-| TemplateHaskell helper for Ganeti Haskell code.
 
@@ -479,7 +480,7 @@ genToRaw traw fname tname constructors = do
 genFromRaw :: Name -> Name -> Name -> [(String, Either String Name)] -> Q [Dec]
 genFromRaw traw fname tname constructors = do
   -- signature of form (Monad m) => String -> m $name
-  sigt <- [t| (Monad m) => $(conT traw) -> m $(conT tname) |]
+  sigt <- [t| forall m. (Monad m) => $(conT traw) -> m $(conT tname) |]
   -- clauses for a guarded pattern
   let varp = mkName "s"
       varpe = varE varp
-- 
2.5.0.457.gab17608

Reply via email to