th-instance-reification 0.1.3 → 0.1.4
raw patch · 2 files changed
+16/−10 lines, 2 filesdep −HUnitdep −QuickCheckdep −quickcheck-instancesdep ~basedep ~containersdep ~list-extras
Dependencies removed: HUnit, QuickCheck, quickcheck-instances
Dependency ranges changed: base, containers, list-extras, template-haskell, th-expand-syns
Files
src/THInstanceReification.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} -- | -- Fixed versions of 'reifyInstances' and 'isInstance' as per -- the following ghc issue:@@ -81,10 +82,18 @@ -- tested types. analyzePredicate :: Pred -> Q Bool analyzePredicate = \case+#if MIN_VERSION_template_haskell(2,10,0)+ AppT (AppT EqualityT _) _ -> return True+ AppT (ConT n) t -> do+ let t' = replaceTypeVars actualTypeByVarName t+ isProperInstance n [t']+ _ -> return True+#else EqualP _ _ -> return True ClassP n tl -> do let tl' = map (replaceTypeVars actualTypeByVarName) tl isProperInstance n tl'+#endif unapplyType :: Type -> [Type] unapplyType = \case
th-instance-reification.cabal view
@@ -1,7 +1,7 @@ name: th-instance-reification version:- 0.1.3+ 0.1.4 synopsis: Fixed versions of instances reification functions description:@@ -47,16 +47,16 @@ THInstanceReification build-depends: -- data:- containers,+ containers >= 0.4 && < 0.6, -- debugging: loch-th == 0.2.*, placeholders == 0.1.*, -- template-haskell: th-expand-syns == 0.3.*,- template-haskell,+ template-haskell < 2.11, -- general: list-extras == 0.4.*,- base >= 4.5 && < 5+ base >= 4.6 && < 5 default-extensions: Arrows BangPatterns@@ -107,9 +107,6 @@ "-with-rtsopts=-N" build-depends: -- testing:- quickcheck-instances,- QuickCheck,- HUnit, HTF == 0.12.*, -- data: containers,@@ -117,11 +114,11 @@ loch-th == 0.2.*, placeholders == 0.1.*, -- template-haskell:- th-expand-syns == 0.3.*,+ th-expand-syns, template-haskell, -- general:- list-extras == 0.4.*,- base >= 4.5 && < 5+ list-extras,+ base default-extensions: Arrows BangPatterns