[commit: hsc2hs] master: Reduce CPP need (f91c12c)

git at git.haskell.org git at git.haskell.org
Sun Nov 1 10:58:50 UTC 2015


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

On branch  : master
Link       : http://git.haskell.org/hsc2hs.git/commitdiff/f91c12c4749068a5b38bb536a021b5896f033dc0

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

commit f91c12c4749068a5b38bb536a021b5896f033dc0
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Nov 1 11:19:47 2015 +0100

    Reduce CPP need


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

f91c12c4749068a5b38bb536a021b5896f033dc0
 CrossCodegen.hs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/CrossCodegen.hs b/CrossCodegen.hs
index a8a7f3d..d30e145 100644
--- a/CrossCodegen.hs
+++ b/CrossCodegen.hs
@@ -28,9 +28,7 @@ import System.Directory (removeFile)
 import Data.Char (toLower,toUpper,isSpace)
 import Control.Exception (assert, onException)
 import Control.Monad (when, liftM, forM, ap)
-#if __GLASGOW_HASKELL__ < 709
-import Control.Applicative (Applicative(..))
-#endif
+import Control.Applicative as AP (Applicative(..))
 import Data.Foldable (concatMap)
 import Data.Maybe (fromMaybe)
 import qualified Data.Sequence as S
@@ -56,7 +54,7 @@ instance Applicative TestMonad where
     (<*>) = ap
 
 instance Monad TestMonad where
-    return = pure
+    return = AP.pure
     x >>= fn = TestMonad (\e c -> (runTest x e c) >>=
                                       (\(a,c') -> either (\err -> return (Left err, c'))
                                                          (\result -> runTest (fn result) e c')



More information about the ghc-commits mailing list