File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Cabal/src/Distribution/Utils Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import Prelude ()
1818import Distribution.Simple.Utils
1919import Distribution.Utils.Progress
2020import Distribution.Verbosity
21+ import GHC.Stack (HasCallStack , callStack , prettyCallStack )
2122import Text.PrettyPrint
2223
2324type CtxMsg = Doc
@@ -87,10 +88,14 @@ infoProgress s = LogProgress $ \env ->
8788 stepProgress s
8889
8990-- | Fail the computation with an error message.
90- dieProgress :: Doc -> LogProgress a
91+ dieProgress :: HasCallStack => Doc -> LogProgress a
9192dieProgress s = LogProgress $ \ env ->
9293 failProgress $
93- hang (text " Error:" ) 4 (formatMsg (le_context env) s)
94+ hang (text " Error:" ) 4 $
95+ vcat
96+ [ formatMsg (le_context env) s
97+ , text (prettyCallStack callStack)
98+ ]
9499
95100-- | Format a message with context. (Something simple for now.)
96101formatMsg :: [CtxMsg ] -> Doc -> Doc
You can’t perform that action at this time.
0 commit comments