File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Cabal/src/Distribution/Utils Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import Distribution.Simple.Utils
1919import Distribution.Utils.Progress
2020import Distribution.Verbosity
2121import Text.PrettyPrint
22+ import GHC.Stack (HasCallStack , callStack , prettyCallStack )
2223
2324type CtxMsg = Doc
2425type LogMsg = Doc
@@ -87,10 +88,13 @@ 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 [ formatMsg (le_context env) s
96+ , text (prettyCallStack callStack)
97+ ]
9498
9599-- | Format a message with context. (Something simple for now.)
96100formatMsg :: [CtxMsg ] -> Doc -> Doc
You can’t perform that action at this time.
0 commit comments