Commit 6a7e159c authored by Matthew Pickering's avatar Matthew Pickering Committed by Ben Gamari

Improve missing-home-modules warning formatting

Previously the modules were smashed together at the end of the line. As
the header is quite long, this meant for quite long lines which wrapped
on smaller terminals.

err msg: A
         B

Now they are nested underneath the long first line of the error message.

err msg:
  A
  B

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4454
parent 969e747f
......@@ -201,11 +201,16 @@ warnMissingHomeModules hsc_env mod_graph =
msg
| gopt Opt_BuildingCabalPackage dflags
= text "These modules are needed for compilation but not listed in your .cabal file's other-modules: "
<> sep (map ppr missing)
= hang
(text "These modules are needed for compilation but not listed in your .cabal file's other-modules: ")
4
(sep (map ppr missing))
| otherwise
= text "Modules are not listed in command line but needed for compilation: "
<> sep (map ppr missing)
=
hang
(text "Modules are not listed in command line but needed for compilation: ")
4
(sep (map ppr missing))
warn = makeIntoWarning
(Reason Opt_WarnMissingHomeModules)
(mkPlainErrMsg dflags noSrcSpan msg)
......
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