packages feed

flexible-defaults 0.0.1.1 → 0.0.1.2

raw patch · 2 files changed

+11/−12 lines, 2 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

flexible-defaults.cabal view
@@ -1,5 +1,5 @@ name:                   flexible-defaults-version:                0.0.1.1+version:                0.0.1.2 stability:              provisional  cabal-version:          >= 1.6@@ -27,20 +27,12 @@                         additionally be given \"suitability scores\", so that                         when multiple possible choices could be made, the                         library can choose the \"best\" one.-                        .-                        Changes in 0.0.1.0: Updated for Template Haskell changes -                        in GHC 7.6-                        .-                        Changes in v0.0.0.3:  Added a hack to fix under GHC 7.2.-                        .-                        Changes in v0.0.0.2:  Nothing at all except setting -                        'buildable: False' under GHC 7.2.1.  extra-source-files:     examples/*.hs -tested-with:            GHC == 6.8.3, GHC == 6.10.4, GHC == 6.12.3,-                        GHC == 7.0.4, GHC == 7.2.1, GHC == 7.2.2,-                        GHC == 7.4.2, GHC == 7.6.1+tested-with:            GHC == 7.0.4, GHC == 7.2.1, GHC == 7.2.2,+                        GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4,+                        GHC == 7.10.3, GHC == 8.0.1, GHC == 8.1  source-repository head   type:                 git
src/Language/Haskell/TH/FlexibleDefaults.hs view
@@ -5,6 +5,7 @@ -- 1. <https://github.com/mokus0/flexible-defaults/tree/master/examples> -- -- 2. <https://github.com/mokus0/random-fu/blob/master/random-source/src/Data/Random/Internal/TH.hs>+{-# LANGUAGE CPP #-} module Language.Haskell.TH.FlexibleDefaults     ( Defaults     , scoreBy@@ -70,9 +71,15 @@     dec <- decQ          case dec of+#if MIN_VERSION_template_haskell(2,11,0)+        [InstanceD ol clsCxt cls decs] -> do+            impl <- implementDefaults defs decs+            return [InstanceD ol clsCxt cls impl]+#else         [InstanceD clsCxt cls decs] -> do             impl <- implementDefaults defs decs             return [InstanceD clsCxt cls impl]+#endif                  _ -> fail "withDefaults: second parameter should be a single instance declaration"