[commit: ghc] master: template-haskell: remove redundant CPP use (941b8f5)

git at git.haskell.org git at git.haskell.org
Tue Mar 8 11:49:22 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/941b8f5fa1ffbf404fde1f59a7866b937efd173a/ghc

>---------------------------------------------------------------

commit 941b8f5fa1ffbf404fde1f59a7866b937efd173a
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Tue Mar 8 12:46:49 2016 +0100

    template-haskell: remove redundant CPP use
    
    GHC 8.1's template-haskell package requires base>=4.8 anyway, so
    we can assume Numeric.Natural to be available unconditionally.


>---------------------------------------------------------------

941b8f5fa1ffbf404fde1f59a7866b937efd173a
 libraries/template-haskell/Language/Haskell/TH/Syntax.hs | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
index 86242aa..f26f37e 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
@@ -4,10 +4,6 @@
 
 {-# OPTIONS_GHC -fno-warn-inline-rule-shadowing #-}
 
-#if MIN_VERSION_base(4,8,0)
-#define HAS_NATURAL
-#endif
-
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Language.Haskell.Syntax
@@ -40,10 +36,7 @@ import Data.Ratio
 import GHC.Generics     ( Generic )
 import GHC.Lexeme       ( startsVarSym, startsVarId )
 import Language.Haskell.TH.LanguageExtensions
-
-#ifdef HAS_NATURAL
 import Numeric.Natural
-#endif
 
 -----------------------------------------------------
 --
@@ -570,10 +563,8 @@ instance Lift Word32 where
 instance Lift Word64 where
   lift x = return (LitE (IntegerL (fromIntegral x)))
 
-#ifdef HAS_NATURAL
 instance Lift Natural where
   lift x = return (LitE (IntegerL (fromIntegral x)))
-#endif
 
 instance Integral a => Lift (Ratio a) where
   lift x = return (LitE (RationalL (toRational x)))



More information about the ghc-commits mailing list