[commit: ghc] master: base: Remove a redundant 'return' (15c63d2)

git at git.haskell.org git at git.haskell.org
Thu Aug 27 08:01:45 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/15c63d2ac1983a72de20ec83b7263bf12b79ae49/ghc

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

commit 15c63d2ac1983a72de20ec83b7263bf12b79ae49
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Mar 26 11:06:12 2015 +0000

    base: Remove a redundant 'return'


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

15c63d2ac1983a72de20ec83b7263bf12b79ae49
 libraries/base/Foreign/Marshal/Array.hs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libraries/base/Foreign/Marshal/Array.hs b/libraries/base/Foreign/Marshal/Array.hs
index 0aea67b..5e10341 100644
--- a/libraries/base/Foreign/Marshal/Array.hs
+++ b/libraries/base/Foreign/Marshal/Array.hs
@@ -211,8 +211,7 @@ withArrayLen :: Storable a => [a] -> (Int -> Ptr a -> IO b) -> IO b
 withArrayLen vals f  =
   allocaArray len $ \ptr -> do
       pokeArray ptr vals
-      res <- f len ptr
-      return res
+      f len ptr
   where
     len = length vals
 



More information about the ghc-commits mailing list