diff --git a/ghcide/src/Development/IDE/Core/Compile.hs b/ghcide/src/Development/IDE/Core/Compile.hs index 4ed988140e..fc99a52b02 100644 --- a/ghcide/src/Development/IDE/Core/Compile.hs +++ b/ghcide/src/Development/IDE/Core/Compile.hs @@ -1037,7 +1037,7 @@ writeHiFile se hscEnv tc = handleGenerationErrors :: DynFlags -> T.Text -> IO () -> IO [FileDiagnostic] handleGenerationErrors dflags source action = - action >> pure [] `catches` + (action >> pure []) `catches` [ Handler $ pure . diagFromGhcException source dflags , Handler $ \(exception :: SomeException) -> pure $ diagFromString