File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
ghcide/src/Development/IDE/GHC Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ import Development.IDE.GHC.Error
1414import Development.IDE.Types.Diagnostics
1515
1616{-
17- NOTE on withWarnings and its dangers
18-
17+ Note [ withWarnings and its dangers]
18+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1919 withWarnings collects warnings by registering a custom logger which extracts
2020 the SDocs of those warnings. If you receive warnings this way, you will not
2121 get them in a structured form. In the medium term we'd like to remove all
@@ -46,6 +46,8 @@ import Development.IDE.Types.Diagnostics
4646-- https://github.com/ghc/ghc/blob/5f1d949ab9e09b8d95319633854b7959df06eb58/compiler/main/GHC.hs#L623-L640
4747-- which basically says that log_action is taken from the ModSummary when GHC feels like it.
4848-- The given argument lets you refresh a ModSummary log_action
49+ --
50+ -- Also, See Note [withWarnings and its dangers] for some commentary on this function.
4951withWarnings :: T. Text -> ((HscEnv -> HscEnv ) -> IO a ) -> IO ([(Maybe DiagnosticReason , FileDiagnostic )], a )
5052withWarnings diagSource action = do
5153 warnings <- newVar []
You can’t perform that action at this time.
0 commit comments