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 @@ -19,6 +19,7 @@ import Prelude ()
1919import Distribution.Simple.Utils
2020import Distribution.Utils.Progress
2121import Distribution.Verbosity
22+ import GHC.Stack (HasCallStack , callStack , prettyCallStack )
2223import Text.PrettyPrint
2324
2425type CtxMsg = Doc
@@ -88,10 +89,14 @@ infoProgress s = LogProgress $ \env ->
8889 stepProgress s
8990
9091-- | Fail the computation with an error message.
91- dieProgress :: Doc -> LogProgress a
92+ dieProgress :: HasCallStack => Doc -> LogProgress a
9293dieProgress s = LogProgress $ \ env ->
9394 failProgress $
94- hang (text " Error:" ) 4 (formatMsg (le_context env) s)
95+ hang (text " Error:" ) 4 $
96+ vcat
97+ [ formatMsg (le_context env) s
98+ , text (prettyCallStack callStack)
99+ ]
95100
96101-- | Format a message with context. (Something simple for now.)
97102formatMsg :: [CtxMsg ] -> Doc -> Doc
You can’t perform that action at this time.
0 commit comments