[commit: ghc] master: Re-add SPECIALISE liftM* pragmas dropped in d94de87252d0fe (1574871)

git at git.haskell.org git at git.haskell.org
Tue Sep 16 22:35:43 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/15748717d427ab8b6576b392226c4802420bd5c0/ghc

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

commit 15748717d427ab8b6576b392226c4802420bd5c0
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Tue Sep 16 19:33:54 2014 +0200

    Re-add SPECIALISE liftM* pragmas dropped in d94de87252d0fe
    
    They were dropped because `Maybe` wasn't available in GHC.Base, but now
    it is thanks to b47521991a7574f4f3554f7c5444a8c60cfe9efd.
    
    Differential Revision: https://phabricator.haskell.org/D215


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

15748717d427ab8b6576b392226c4802420bd5c0
 libraries/base/GHC/Base.lhs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libraries/base/GHC/Base.lhs b/libraries/base/GHC/Base.lhs
index 73bfb28..54ba348 100644
--- a/libraries/base/GHC/Base.lhs
+++ b/libraries/base/GHC/Base.lhs
@@ -517,14 +517,19 @@ liftM5 f m1 m2 m3 m4 m5 = do { x1 <- m1; x2 <- m2; x3 <- m3; x4 <- m4; x5 <- m5;
 
 {-# INLINEABLE liftM #-}
 {-# SPECIALISE liftM :: (a1->r) -> IO a1 -> IO r #-}
+{-# SPECIALISE liftM :: (a1->r) -> Maybe a1 -> Maybe r #-}
 {-# INLINEABLE liftM2 #-}
 {-# SPECIALISE liftM2 :: (a1->a2->r) -> IO a1 -> IO a2 -> IO r #-}
+{-# SPECIALISE liftM2 :: (a1->a2->r) -> Maybe a1 -> Maybe a2 -> Maybe r #-}
 {-# INLINEABLE liftM3 #-}
 {-# SPECIALISE liftM3 :: (a1->a2->a3->r) -> IO a1 -> IO a2 -> IO a3 -> IO r #-}
+{-# SPECIALISE liftM3 :: (a1->a2->a3->r) -> Maybe a1 -> Maybe a2 -> Maybe a3 -> Maybe r #-}
 {-# INLINEABLE liftM4 #-}
 {-# SPECIALISE liftM4 :: (a1->a2->a3->a4->r) -> IO a1 -> IO a2 -> IO a3 -> IO a4 -> IO r #-}
+{-# SPECIALISE liftM4 :: (a1->a2->a3->a4->r) -> Maybe a1 -> Maybe a2 -> Maybe a3 -> Maybe a4 -> Maybe r #-}
 {-# INLINEABLE liftM5 #-}
 {-# SPECIALISE liftM5 :: (a1->a2->a3->a4->a5->r) -> IO a1 -> IO a2 -> IO a3 -> IO a4 -> IO a5 -> IO r #-}
+{-# SPECIALISE liftM5 :: (a1->a2->a3->a4->a5->r) -> Maybe a1 -> Maybe a2 -> Maybe a3 -> Maybe a4 -> Maybe a5 -> Maybe r #-}
 
 {- | In many situations, the 'liftM' operations can be replaced by uses of
 'ap', which promotes function application. 



More information about the ghc-commits mailing list