Skip to content

Commit f08cb25

Browse files
committed
Fix rendering of pretty errors by stack ghci
1 parent 106683c commit f08cb25

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Stack/Ghci.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,9 @@ buildDepsAndInitialSteps GhciOpts{..} localTargets = do
466466
case eres of
467467
Right () -> pure ()
468468
Left err -> do
469-
prettyError $ fromString (displayException err)
469+
case fromException err of
470+
Just (PrettyException prettyErr) -> prettyError $ pretty prettyErr
471+
Nothing -> prettyError $ fromString (displayException err)
470472
prettyWarn "Build failed, but trying to launch GHCi anyway"
471473
_ ->
472474
pure ()

0 commit comments

Comments
 (0)