diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-09-30 10:45:05 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-19 03:30:16 -0400 |
commit | 8144a92f5a73dd22c0d855d5b2bead930111511c (patch) | |
tree | 75a4c20d945da72a2e52fc802d030701b0cffbce /compiler/GHC/Core/Opt/WorkWrap.hs | |
parent | 51281e81601fb0b288c921728ea3b3f568f77af7 (diff) | |
download | haskell-8144a92f5a73dd22c0d855d5b2bead930111511c.tar.gz |
WW: Use module name rather than filename for absent error messages
WwOpts in WorkWrap.Utils initialised the wo_output_file field with the
result of outputFile dflags. This is misguided because outputFile is
only set when -o is specified, which is barely ever (and never in --make
mode).
It seems this is
just used to add more context to an error message, a more appropriate
thing to use I think would be a module name.
Fixes #20438
Diffstat (limited to 'compiler/GHC/Core/Opt/WorkWrap.hs')
-rw-r--r-- | compiler/GHC/Core/Opt/WorkWrap.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/Core/Opt/WorkWrap.hs b/compiler/GHC/Core/Opt/WorkWrap.hs index 2c204795c9..976dcd5fe5 100644 --- a/compiler/GHC/Core/Opt/WorkWrap.hs +++ b/compiler/GHC/Core/Opt/WorkWrap.hs @@ -37,6 +37,7 @@ import GHC.Utils.Panic import GHC.Utils.Panic.Plain import GHC.Utils.Monad import GHC.Utils.Trace +import GHC.Unit.Types {- We take Core bindings whose binders have: @@ -66,14 +67,14 @@ info for exported values). \end{enumerate} -} -wwTopBinds :: DynFlags -> FamInstEnvs -> UniqSupply -> CoreProgram -> CoreProgram +wwTopBinds :: Module -> DynFlags -> FamInstEnvs -> UniqSupply -> CoreProgram -> CoreProgram -wwTopBinds dflags fam_envs us top_binds +wwTopBinds this_mod dflags fam_envs us top_binds = initUs_ us $ do top_binds' <- mapM (wwBind ww_opts) top_binds return (concat top_binds') where - ww_opts = initWwOpts dflags fam_envs + ww_opts = initWwOpts this_mod dflags fam_envs {- ************************************************************************ |