reflection 1.5.1.2 → 1.5.2
raw patch · 3 files changed
+17/−13 lines, 3 files
Files
- CHANGELOG.markdown +3/−0
- fast/Data/Reflection.hs +5/−5
- reflection.cabal +9/−8
CHANGELOG.markdown view
@@ -1,3 +1,6 @@+# 1.5.2+* Renamed the flag for disabling the use of `template-haskell`, to `-f-template-haskell` for consistency with my other packages.+ # 1.5.1.2 * Builds warning-free on GHC 7.10. * Added a dynamic FromJSON example.
fast/Data/Reflection.hs view
@@ -14,7 +14,7 @@ {-# LANGUAGE TypeOperators #-} #define USE_TYPE_LITS 1 #endif-#ifdef TEMPLATE_HASKELL+#ifdef MIN_VERSION_template_haskell {-# LANGUAGE TemplateHaskell #-} #endif {-# OPTIONS_GHC -fno-warn-orphans #-}@@ -61,7 +61,7 @@ -- * Given , Given(..) , give-#ifdef TEMPLATE_HASKELL+#ifdef MIN_VERSION_template_haskell -- * Template Haskell reflection , int, nat #endif@@ -71,11 +71,11 @@ import Data.Proxy -#if (defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 707) || (TEMPLATE_HASKELL && USE_TYPE_LITS)+#if (defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 707) || (defined(MIN_VERSION_template_haskell) && USE_TYPE_LITS) import GHC.TypeLits #endif -#ifdef TEMPLATE_HASKELL+#ifdef MIN_VERSION_template_haskell import Language.Haskell.TH hiding (reify) import Control.Monad #endif@@ -165,7 +165,7 @@ reflect = (\n -> n + n - 1) `fmap` retagPD reflect {-# INLINE reflect #-} -#ifdef TEMPLATE_HASKELL+#ifdef MIN_VERSION_template_haskell -- | This can be used to generate a template haskell splice for a type level version of a given 'int'. -- -- This does not use GHC TypeLits, instead it generates a numeric type by hand similar to the ones used
reflection.cabal view
@@ -1,5 +1,5 @@ name: reflection-version: 1.5.1.2+version: 1.5.2 license: BSD3 license-file: LICENSE author: Edward A. Kmett, Elliott Hird, Oleg Kiselyov and Chung-chieh Shan@@ -80,15 +80,17 @@ fast/Data/Reflection.hs .travis.yml --- If you enable this flag, we use a more portable much much slower implementation.--- Moreover, the 'Given' API is broken, so this is currently an unsupported configuration.------ If you feel the need to turn on this flag for any reason, please email the maintainer! flag slow+ description:+ If you enable this flag, we use a more portable much much slower implementation. Moreover, the 'Given' API is broken, so this is currently an unsupported configuration. If you feel the need to turn on this flag for any reason, please email the maintainer! default: False manual: False -flag th+flag template-haskell+ description:+ You can disable the use of the `template-haskell` package using `-f-template-haskell`.+ .+ Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users. default: True manual: True @@ -111,8 +113,7 @@ default-language: Haskell98 - if flag(th) && impl(ghc)- cpp-options: -DTEMPLATE_HASKELL+ if flag(template-haskell) && impl(ghc) build-depends: template-haskell if !flag(slow) && (impl(ghc) || impl(hugs))