Skip to content

Commit abd1a39

Browse files
committed
Use GHC Note syntax and reference Note in docs
Allows HLS to 'Goto Definition' for Note references.
1 parent 54576e1 commit abd1a39

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ghcide/src/Development/IDE/GHC/Warnings.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import Development.IDE.GHC.Error
1414
import 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.
4951
withWarnings :: T.Text -> ((HscEnv -> HscEnv) -> IO a) -> IO ([(Maybe DiagnosticReason, FileDiagnostic)], a)
5052
withWarnings diagSource action = do
5153
warnings <- newVar []

0 commit comments

Comments
 (0)