mirror of
https://github.com/google/ormolu.git
synced 2024-11-23 14:16:24 +03:00
Do not use GHC's defaultErrorHandler
It makes the exceptions get wrapped as GHC panic's.
This commit is contained in:
parent
ed27fb4a9a
commit
4bed990334
@ -131,9 +131,10 @@ initDynFlagsPure fp input = do
|
||||
-- | Default runner of 'GHC.Ghc' action in 'IO'.
|
||||
|
||||
ghcWrapper :: GHC.Ghc a -> IO a
|
||||
ghcWrapper
|
||||
= GHC.defaultErrorHandler GHC.defaultFatalMessager GHC.defaultFlushOut
|
||||
. GHC.runGhc (Just libdir)
|
||||
ghcWrapper act =
|
||||
let GHC.FlushOut flushOut = GHC.defaultFlushOut
|
||||
in GHC.runGhc (Just libdir) act
|
||||
`finally` flushOut
|
||||
|
||||
-- | Run a 'GHC.P' computation.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user