Commit 71298613 authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan
Browse files

DynamicLoading: Replace map + zip with zipWith

parent 46f5f028
...@@ -71,12 +71,12 @@ import Data.List ( intercalate ) ...@@ -71,12 +71,12 @@ import Data.List ( intercalate )
loadPlugins :: HscEnv -> IO [(ModuleName, Plugin, [CommandLineOption])] loadPlugins :: HscEnv -> IO [(ModuleName, Plugin, [CommandLineOption])]
loadPlugins hsc_env loadPlugins hsc_env
= do { plugins <- mapM (loadPlugin hsc_env) to_load = do { plugins <- mapM (loadPlugin hsc_env) to_load
; return $ map attachOptions $ to_load `zip` plugins } ; return $ zipWith attachOptions to_load plugins }
where where
dflags = hsc_dflags hsc_env dflags = hsc_dflags hsc_env
to_load = pluginModNames dflags to_load = pluginModNames dflags
attachOptions (mod_nm, plug) = (mod_nm, plug, options) attachOptions mod_nm plug = (mod_nm, plug, options)
where where
options = [ option | (opt_mod_nm, option) <- pluginModNameOpts dflags options = [ option | (opt_mod_nm, option) <- pluginModNameOpts dflags
, opt_mod_nm == mod_nm ] , opt_mod_nm == mod_nm ]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment