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
14
14
import Development.IDE.Types.Diagnostics
15
15
16
16
{-
17
- NOTE on withWarnings and its dangers
18
-
17
+ Note [ withWarnings and its dangers]
18
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19
19
withWarnings collects warnings by registering a custom logger which extracts
20
20
the SDocs of those warnings. If you receive warnings this way, you will not
21
21
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
46
46
-- https://github.com/ghc/ghc/blob/5f1d949ab9e09b8d95319633854b7959df06eb58/compiler/main/GHC.hs#L623-L640
47
47
-- which basically says that log_action is taken from the ModSummary when GHC feels like it.
48
48
-- 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.
49
51
withWarnings :: T. Text -> ((HscEnv -> HscEnv ) -> IO a ) -> IO ([(Maybe DiagnosticReason , FileDiagnostic )], a )
50
52
withWarnings diagSource action = do
51
53
warnings <- newVar []
You can’t perform that action at this time.
0 commit comments