[commit: ghc] wip/T9858-typeable-spj: Remove a redndant 'return' (fcd18c4)

git at git.haskell.org git at git.haskell.org
Thu Mar 26 12:41:21 UTC 2015


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

On branch  : wip/T9858-typeable-spj
Link       : http://ghc.haskell.org/trac/ghc/changeset/fcd18c42b6ae2e73a9f4c67dbe6d994b0f8468c8/ghc

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

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

    Remove a redndant 'return'


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

fcd18c42b6ae2e73a9f4c67dbe6d994b0f8468c8
 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