Skip to content

Commit c5eeaee

Browse files
committed
treewide: Add missing underscores to note definitions
1 parent 656817e commit c5eeaee

File tree

11 files changed

+21
-2
lines changed

11 files changed

+21
-2
lines changed

ghcide/src/Development/IDE/Core/Compile.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ tcRnModule hsc_env tc_helpers pmod = do
436436

437437

438438
-- Note [Clearing mi_globals after generating an iface]
439+
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
439440
-- GHC populates the mi_global field in interfaces for GHCi if we are using the bytecode
440441
-- interpreter.
441442
-- However, this field is expensive in terms of heap usage, and we don't use it in HLS
@@ -1366,7 +1367,7 @@ loadHieFile ncu f = do
13661367

13671368

13681369
{- Note [Recompilation avoidance in the presence of TH]
1369-
1370+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13701371
Most versions of GHC we currently support don't have a working implementation of
13711372
code unloading for object code, and no version of GHC supports this on certain
13721373
platforms like Windows. This makes it completely infeasible for interactive use,
@@ -1736,6 +1737,7 @@ pathToModuleName = mkModuleName . map rep
17361737
rep c = c
17371738

17381739
{- Note [Guidelines For Using CPP In GHCIDE Import Statements]
1740+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17391741
GHCIDE's interface with GHC is extensive, and unfortunately, because we have
17401742
to work with multiple versions of GHC, we have several files that need to use
17411743
a lot of CPP. In order to simplify the CPP in the import section of every file

ghcide/src/Development/IDE/Core/FileExists.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import qualified System.Directory as Dir
4040
import qualified System.FilePath.Glob as Glob
4141

4242
{- Note [File existence cache and LSP file watchers]
43+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4344
Some LSP servers provide the ability to register file watches with the client, which will then notify
4445
us of file changes. Some clients can do this more efficiently than us, or generally it's a tricky
4546
problem
@@ -135,6 +136,7 @@ getFileExists :: NormalizedFilePath -> Action Bool
135136
getFileExists fp = use_ GetFileExists fp
136137

137138
{- Note [Which files should we watch?]
139+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138140
The watcher system gives us a lot of flexibility: we can set multiple watchers, and they can all watch on glob
139141
patterns.
140142
@@ -201,6 +203,7 @@ fileExistsRulesFast recorder isWatched =
201203
else fileExistsSlow file
202204

203205
{- Note [Invalidating file existence results]
206+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
204207
We have two mechanisms for getting file existence information:
205208
- The file existence cache
206209
- The VFS lookup

ghcide/src/Development/IDE/Core/RuleTypes.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ makeLensesWith
512512
''Splices
513513

514514
{- Note [Client configuration in Rules]
515+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
515516
The LSP client configuration is stored by `lsp` for us, and is accesible in
516517
handlers through the LspT monad.
517518

ghcide/src/Development/IDE/Core/Rules.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ instance Default GhcSessionDepsConfig where
749749
}
750750

751751
-- | Note [GhcSessionDeps]
752+
-- ~~~~~~~~~~~~~~~~~~~~~
752753
-- For a file 'Foo', GhcSessionDeps "Foo.hs" results in an HscEnv which includes
753754
-- 1. HomeModInfo's (in the HUG/HPT) for all modules in the transitive closure of "Foo", **NOT** including "Foo" itself.
754755
-- 2. ModSummary's (in the ModuleGraph) for all modules in the transitive closure of "Foo", including "Foo" itself.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ realSrcLocToPosition real =
9191
Position (fromIntegral $ srcLocLine real - 1) (fromIntegral $ srcLocCol real - 1)
9292

9393
-- Note [Unicode support]
94+
-- ~~~~~~~~~~~~~~~~~~~~~~
9495
-- the current situation is:
9596
-- LSP Positions use UTF-16 code units(Unicode may count as variable columns);
9697
-- GHC use Unicode code points(Unicode count as one column).

ghcide/src/Development/IDE/Plugin/HLS.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ instance Monoid IdeNotificationHandlers where
359359
mempty = IdeNotificationHandlers mempty
360360

361361
{- Note [Exception handling in plugins]
362+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
362363
Plugins run in LspM, and so have access to IO. This means they are likely to
363364
throw exceptions, even if only by accident or through calling libraries that
364365
throw exceptions. Ultimately, we're running a bunch of less-trusted IO code,

haskell-language-server.cabal

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ common pedantic
6060
if flag(pedantic)
6161
ghc-options:
6262
-Werror
63-
-- Note [unused-packages] Some packages need CPP conditioned on MIN_VERSION_ghc(x,y,z).
63+
-- Note [unused-packages]
64+
-- ~~~~~~~~~~~~~~~~~~~~~~
65+
-- Some packages need CPP conditioned on MIN_VERSION_ghc(x,y,z).
6466
-- MIN_VERSION_<pkg> is CPP macro that cabal defines only when <pkg> is declared as a dependency.
6567
-- But -Wunused-packages still reports it as unused dependency if it's not imported.
6668
-- For packages with such "unused" dependencies we demote -Wunused-packages error

hie-compat/src-ghc92/Compat/HieAst.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ import GHC.HsToCore.Expr
8383
import GHC.HsToCore.Monad
8484

8585
{- Note [Updating HieAst for changes in the GHC AST]
86+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8687
8788
When updating the code in this file for changes in the GHC AST, you
8889
need to pay attention to the following things:
@@ -218,6 +219,7 @@ type TypecheckedSource = LHsBinds GhcTc
218219

219220

220221
{- Note [Name Remapping]
222+
~~~~~~~~~~~~~~~~~~~~~
221223
The Typechecker introduces new names for mono names in AbsBinds.
222224
We don't care about the distinction between mono and poly bindings,
223225
so we replace all occurrences of the mono name with the poly name.
@@ -425,6 +427,7 @@ concatM :: Monad m => [m [a]] -> m [a]
425427
concatM xs = concat <$> sequence xs
426428

427429
{- Note [Capturing Scopes and other non local information]
430+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
428431
toHie is a local transformation, but scopes of bindings cannot be known locally,
429432
hence we have to push the relevant info down into the binding nodes.
430433
We use the following types (*Context and *Scoped) to wrap things and
@@ -469,6 +472,7 @@ data PScoped a = PS (Maybe Span)
469472
deriving (Typeable, Data) -- Pattern Scope
470473

471474
{- Note [TyVar Scopes]
475+
~~~~~~~~~~~~~~~~~~~
472476
Due to -XScopedTypeVariables, type variables can be in scope quite far from
473477
their original binding. We resolve the scope of these type variables
474478
in a separate pass
@@ -522,6 +526,7 @@ tvScopes tvScope rhsScope xs =
522526
map (\(RS sc a)-> TVS tvScope sc a) $ listScopes rhsScope xs
523527

524528
{- Note [Scoping Rules for SigPat]
529+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
525530
Explicitly quantified variables in pattern type signatures are not
526531
brought into scope in the rhs, but implicitly quantified variables
527532
are (HsWC and HsIB).

hls-plugin-api/src/Ide/Plugin/Resolve.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ parseError :: Maybe A.Value -> T.Text -> PluginError
203203
parseError value errMsg = PluginInternalError ("Ide.Plugin.Resolve: Error parsing value:"<> (T.pack $ show value) <> " Error: "<> errMsg)
204204

205205
{- Note [Code action resolve fallback to commands]
206+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
206207
To make supporting code action resolve easy for plugins, we want to let them
207208
provide one implementation that can be used both when clients support
208209
resolve, and when they don't.

hls-plugin-api/src/Ide/Types.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,7 @@ installSigUsr1Handler h = void $ installHandler sigUSR1 (Catch h) Nothing
11821182
#endif
11831183

11841184
{- Note [Resolve in PluginHandlers]
1185+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11851186
Resolve methods have a few guarantees that need to be made by HLS,
11861187
specifically they need to only be called once, as neither their errors nor
11871188
their responses can be easily combined. Whereas commands, which similarly have

plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ diagInRange Diagnostic {_range = dr} r = dr `subRange` extendedRange
446446
extendedRange = extendToFullLines r
447447

448448
-- Note [Removing imports is preferred]
449+
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
449450
-- It's good to prefer the remove imports code action because an unused import
450451
-- is likely to be removed and less likely the warning will be disabled.
451452
-- Therefore actions to remove a single or all redundant imports should be

0 commit comments

Comments
 (0)