[commit: ghc] master: DynamicLoading: Replace map + zip with zipWith (7129861)

git at git.haskell.org git at git.haskell.org
Tue Oct 18 19:29:07 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/7129861397f8e1ea9dbe299708633d118a3085fa/ghc

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

commit 7129861397f8e1ea9dbe299708633d118a3085fa
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date:   Tue Oct 18 15:05:16 2016 -0400

    DynamicLoading: Replace map + zip with zipWith


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

7129861397f8e1ea9dbe299708633d118a3085fa
 compiler/main/DynamicLoading.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/main/DynamicLoading.hs b/compiler/main/DynamicLoading.hs
index 2b2365f..5658f2f 100644
--- a/compiler/main/DynamicLoading.hs
+++ b/compiler/main/DynamicLoading.hs
@@ -71,12 +71,12 @@ import Data.List        ( intercalate )
 loadPlugins :: HscEnv -> IO [(ModuleName, Plugin, [CommandLineOption])]
 loadPlugins hsc_env
   = do { plugins <- mapM (loadPlugin hsc_env) to_load
-       ; return $ map attachOptions $ to_load `zip` plugins }
+       ; return $ zipWith attachOptions to_load plugins }
   where
     dflags  = hsc_dflags hsc_env
     to_load = pluginModNames dflags
 
-    attachOptions (mod_nm, plug) = (mod_nm, plug, options)
+    attachOptions mod_nm plug = (mod_nm, plug, options)
       where
         options = [ option | (opt_mod_nm, option) <- pluginModNameOpts dflags
                             , opt_mod_nm == mod_nm ]



More information about the ghc-commits mailing list