Skip to content

Commit 9951f35

Browse files
authored
Use NormalizedFilePath and adapt types of haskell-lsp-0.21 (#479)
* Use custom version of h-l-t * Use normalized path functions from h-l-t * Restore empty path corner case * Create a wrapper over NFP to override IsString * Use maybe instead fromMaybe * Use patched version of lsp-types in all yaml files * Remove unused import * Rename specific NormalizeFilePath to NormalizeFilePath' * Remove specific newtype and IsString instance * Use released haskell-lsp-0.21 * Adapt to type changes of haskell-lsp-0.21 * Add tags field to CompletionItem * Fix test case about empty file path * Correct stack.yaml used in azure ci cache * Build ghcide including tests in windows azure ci * Qualify haskell-lsp modules to avoid name clashes
1 parent 209be0b commit 9951f35

26 files changed

+87
-197
lines changed

.azure/linux-stack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- checkout: self
1818
- task: Cache@2
1919
inputs:
20-
key: stack-cache-v2 | $(Agent.OS) | $(Build.SourcesDirectory)/stack.yaml | $(Build.SourcesDirectory)/ghcide.cabal
20+
key: stack-cache-v2 | $(Agent.OS) | $(Build.SourcesDirectory)/$(STACK_YAML) | $(Build.SourcesDirectory)/ghcide.cabal
2121
path: .azure-cache
2222
cacheHitVar: CACHE_RESTORED
2323
displayName: "Cache stack artifacts"

.azure/windows-stack.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,9 @@ jobs:
4646
stack install alex --stack-yaml $STACK_YAML
4747
stack build --only-dependencies --stack-yaml $STACK_YAML
4848
displayName: 'stack build --only-dependencies'
49-
- bash: stack test --ghc-options=-Werror --stack-yaml $STACK_YAML || stack test --ghc-options=-Werror --stack-yaml $STACK_YAML || stack test --ghc-options=-Werror --stack-yaml $STACK_YAML
50-
# ghcide stack tests are flaky, see https://github.com/digital-asset/daml/issues/2606.
49+
- bash: stack test --no-run-tests --ghc-options=-Werror --stack-yaml $STACK_YAML
5150
displayName: 'stack test --ghc-options=-Werror'
52-
# TODO: Enable when failing tests are fixed or marked as broken. See https://github.com/digital-asset/ghcide/issues/474
53-
condition: False
51+
# TODO: run test suite when failing tests are fixed or marked as broken. See https://github.com/digital-asset/ghcide/issues/474
5452
- bash: |
5553
mkdir -p .azure-cache
5654
tar -vczf .azure-cache/stack-root.tar.gz $(cygpath $STACK_ROOT)

exe/Main.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ main = do
146146
ide <- initialise def (cradleRules >> mainRule) (pure $ IdInt 0) (showEvent lock) (logger Info) noopDebouncer options vfs
147147

148148
putStrLn "\nStep 6/6: Type checking the files"
149-
setFilesOfInterest ide $ HashSet.fromList $ map toNormalizedFilePath files
150-
results <- runActionSync ide $ uses TypeCheck $ map toNormalizedFilePath files
149+
setFilesOfInterest ide $ HashSet.fromList $ map toNormalizedFilePath' files
150+
results <- runActionSync ide $ uses TypeCheck $ map toNormalizedFilePath' files
151151
let (worked, failed) = partition fst $ zip (map isJust results) files
152152
when (failed /= []) $
153153
putStr $ unlines $ "Files that failed:" : map ((++) " * " . snd) failed
@@ -183,7 +183,7 @@ kick = do
183183
-- | Print an LSP event.
184184
showEvent :: Lock -> FromServerMessage -> IO ()
185185
showEvent _ (EventFileDiagnostics _ []) = return ()
186-
showEvent lock (EventFileDiagnostics (toNormalizedFilePath -> file) diags) =
186+
showEvent lock (EventFileDiagnostics (toNormalizedFilePath' -> file) diags) =
187187
withLock lock $ T.putStrLn $ showDiagnosticsColored $ map (file,ShowDiag,) diags
188188
showEvent lock e = withLock lock $ print e
189189

@@ -199,7 +199,7 @@ loadSession dir = liftIO $ do
199199
let session :: Maybe FilePath -> Action HscEnvEq
200200
session file = do
201201
-- In the absence of a cradle file, just pass the directory from where to calculate an implicit cradle
202-
let cradle = toNormalizedFilePath $ fromMaybe dir file
202+
let cradle = toNormalizedFilePath' $ fromMaybe dir file
203203
use_ LoadCradle cradle
204204
return $ \file -> session =<< liftIO (cradleLoc file)
205205

exe/Rules.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ import qualified System.Directory.Extra as IO
3636
import System.Environment (lookupEnv)
3737
import System.FilePath.Posix (addTrailingPathSeparator,
3838
(</>))
39-
import Language.Haskell.LSP.Messages as LSP
40-
import Language.Haskell.LSP.Types as LSP
39+
import qualified Language.Haskell.LSP.Messages as LSP
40+
import qualified Language.Haskell.LSP.Types as LSP
4141
import Data.Aeson (ToJSON(toJSON))
4242
import Development.IDE.Types.Logger (logDebug)
4343

ghcide.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ library
4343
filepath,
4444
haddock-library >= 1.8,
4545
hashable,
46-
haskell-lsp-types == 0.20.*,
47-
haskell-lsp == 0.20.*,
46+
haskell-lsp-types == 0.21.*,
47+
haskell-lsp == 0.21.*,
4848
mtl,
4949
network-uri,
5050
prettyprinter-ansi-terminal,

src/Development/IDE/Core/Compile.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ computePackageDeps
9393
computePackageDeps env pkg = do
9494
let dflags = hsc_dflags env
9595
case lookupInstalledPackage dflags pkg of
96-
Nothing -> return $ Left [ideErrorText (toNormalizedFilePath noFilePath) $
96+
Nothing -> return $ Left [ideErrorText (toNormalizedFilePath' noFilePath) $
9797
T.pack $ "unknown package: " ++ show pkg]
9898
Just pkgInfo -> return $ Right $ depends pkgInfo
9999

src/Development/IDE/Core/FileExists.hs

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,10 @@ fileExistsFast getLspId vfs file = do
146146
WorkspaceDidChangeWatchedFiles
147147
(Just (A.toJSON regOptions))
148148
regOptions =
149-
DidChangeWatchedFilesRegistrationOptions { watchers = List [watcher] }
150-
watcher = FileSystemWatcher { globPattern = fromNormalizedFilePath fp
151-
, kind = Just 5 -- Create and Delete events only
149+
DidChangeWatchedFilesRegistrationOptions { _watchers = List [watcher] }
150+
watchKind = WatchKind { _watchCreate = True, _watchChange = False, _watchDelete = True}
151+
watcher = FileSystemWatcher { _globPattern = fromNormalizedFilePath fp
152+
, _kind = Just watchKind
152153
}
153154

154155
eventer $ ReqRegisterCapability req
@@ -174,29 +175,3 @@ getFileExistsVFS vfs file = do
174175
handle (\(_ :: IOException) -> return False) $
175176
(isJust <$> getVirtualFile vfs (filePathToUri' file)) ||^
176177
Dir.doesFileExist (fromNormalizedFilePath file)
177-
178-
--------------------------------------------------------------------------------------------------
179-
-- The message definitions below probably belong in haskell-lsp-types
180-
181-
data DidChangeWatchedFilesRegistrationOptions = DidChangeWatchedFilesRegistrationOptions
182-
{ watchers :: List FileSystemWatcher
183-
}
184-
185-
instance A.ToJSON DidChangeWatchedFilesRegistrationOptions where
186-
toJSON DidChangeWatchedFilesRegistrationOptions {..} =
187-
A.object ["watchers" A..= watchers]
188-
189-
data FileSystemWatcher = FileSystemWatcher
190-
{ -- | The glob pattern to watch.
191-
-- For details on glob pattern syntax, check the spec: https://microsoft.github.io/language-server-protocol/specifications/specification-3-14/#workspace_didChangeWatchedFiles
192-
globPattern :: String
193-
-- | The kind of event to subscribe to. Defaults to all.
194-
-- Defined as a bitmap of Create(1), Change(2), and Delete(4)
195-
, kind :: Maybe Int
196-
}
197-
198-
instance A.ToJSON FileSystemWatcher where
199-
toJSON FileSystemWatcher {..} =
200-
A.object
201-
$ ["globPattern" A..= globPattern]
202-
++ [ "kind" A..= x | Just x <- [kind] ]

src/Development/IDE/Core/Preprocessor.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ data CPPDiag
9696

9797
diagsFromCPPLogs :: FilePath -> [CPPLog] -> [FileDiagnostic]
9898
diagsFromCPPLogs filename logs =
99-
map (\d -> (toNormalizedFilePath filename, ShowDiag, cppDiagToDiagnostic d)) $
99+
map (\d -> (toNormalizedFilePath' filename, ShowDiag, cppDiagToDiagnostic d)) $
100100
go [] logs
101101
where
102102
-- On errors, CPP calls logAction with a real span for the initial log and
@@ -118,7 +118,8 @@ diagsFromCPPLogs filename logs =
118118
_code = Nothing,
119119
_source = Just "CPP",
120120
_message = T.unlines $ cdMessage d,
121-
_relatedInformation = Nothing
121+
_relatedInformation = Nothing,
122+
_tags = Nothing
122123
}
123124

124125

src/Development/IDE/Core/Rules.hs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ useE :: IdeRule k v => k -> NormalizedFilePath -> MaybeT Action v
8080
useE k = MaybeT . use k
8181

8282
useNoFileE :: IdeRule k v => k -> MaybeT Action v
83-
useNoFileE k = useE k ""
83+
useNoFileE k = useE k emptyFilePath
8484

8585
usesE :: IdeRule k v => k -> [NormalizedFilePath] -> MaybeT Action [v]
8686
usesE k = MaybeT . fmap sequence . uses k
8787

8888
defineNoFile :: IdeRule k v => (k -> Action v) -> Rules ()
8989
defineNoFile f = define $ \k file -> do
90-
if file == "" then do res <- f k; return ([], Just res) else
90+
if file == emptyFilePath then do res <- f k; return ([], Just res) else
9191
fail $ "Rule " ++ show k ++ " should always be called with the empty string for a file"
9292

9393

@@ -130,7 +130,7 @@ getHieFile file mod = do
130130
getHomeHieFile :: NormalizedFilePath -> Action ([a], Maybe HieFile)
131131
getHomeHieFile f = do
132132
pm <- use_ GetParsedModule f
133-
let normal_hie_f = toNormalizedFilePath hie_f
133+
let normal_hie_f = toNormalizedFilePath' hie_f
134134
hie_f = ml_hie_file $ ms_location $ pm_mod_summary pm
135135
mbHieTimestamp <- use GetModificationTime normal_hie_f
136136
srcTimestamp <- use_ GetModificationTime f
@@ -292,9 +292,10 @@ reportImportCyclesRule =
292292
, _message = "Cyclic module dependency between " <> showCycle mods
293293
, _code = Nothing
294294
, _relatedInformation = Nothing
295+
, _tags = Nothing
295296
}
296297
where loc = srcSpanToLocation (getLoc imp)
297-
fp = toNormalizedFilePath $ srcSpanToFilename (getLoc imp)
298+
fp = toNormalizedFilePath' $ srcSpanToFilename (getLoc imp)
298299
getModuleName file = do
299300
pm <- use_ GetParsedModule file
300301
pure (moduleNameString . moduleName . ms_mod $ pm_mod_summary pm)

src/Development/IDE/Core/Shake.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ shakeRun IdeState{shakeExtras=ShakeExtras{..}, ..} acts =
414414
Right _ -> "completed"
415415
profile = case res of
416416
Right (_, Just fp) ->
417-
let link = case filePathToUri' $ toNormalizedFilePath fp of
417+
let link = case filePathToUri' $ toNormalizedFilePath' fp of
418418
NormalizedUri _ x -> x
419419
in ", profile saved at " <> T.unpack link
420420
_ -> ""
@@ -473,13 +473,13 @@ useWithStale :: IdeRule k v
473473
useWithStale key file = head <$> usesWithStale key [file]
474474

475475
useNoFile :: IdeRule k v => k -> Action (Maybe v)
476-
useNoFile key = use key ""
476+
useNoFile key = use key emptyFilePath
477477

478478
use_ :: IdeRule k v => k -> NormalizedFilePath -> Action v
479479
use_ key file = head <$> uses_ key [file]
480480

481481
useNoFile_ :: IdeRule k v => k -> Action v
482-
useNoFile_ key = use_ key ""
482+
useNoFile_ key = use_ key emptyFilePath
483483

484484
uses_ :: IdeRule k v => k -> [NormalizedFilePath] -> Action [v]
485485
uses_ key files = do
@@ -819,7 +819,7 @@ filterDiagnostics ::
819819
DiagnosticStore ->
820820
DiagnosticStore
821821
filterDiagnostics keep =
822-
HMap.filterWithKey (\uri _ -> maybe True (keep . toNormalizedFilePath) $ uriToFilePath' $ fromNormalizedUri uri)
822+
HMap.filterWithKey (\uri _ -> maybe True (keep . toNormalizedFilePath') $ uriToFilePath' $ fromNormalizedUri uri)
823823

824824
filterVersionMap
825825
:: HMap.HashMap NormalizedUri (Set.Set TextDocumentVersion)

src/Development/IDE/GHC/Error.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,15 @@ import qualified Outputable as Out
4040

4141

4242
diagFromText :: T.Text -> D.DiagnosticSeverity -> SrcSpan -> T.Text -> FileDiagnostic
43-
diagFromText diagSource sev loc msg = (toNormalizedFilePath $ srcSpanToFilename loc,ShowDiag,)
43+
diagFromText diagSource sev loc msg = (toNormalizedFilePath' $ srcSpanToFilename loc,ShowDiag,)
4444
Diagnostic
4545
{ _range = srcSpanToRange loc
4646
, _severity = Just sev
4747
, _source = Just diagSource -- not shown in the IDE, but useful for ghcide developers
4848
, _message = msg
4949
, _code = Nothing
5050
, _relatedInformation = Nothing
51+
, _tags = Nothing
5152
}
5253

5354
-- | Produce a GHC-style error from a source span and a message.
@@ -80,7 +81,7 @@ srcSpanToFilename (RealSrcSpan real) = FS.unpackFS $ srcSpanFile real
8081
srcSpanToLocation :: SrcSpan -> Location
8182
srcSpanToLocation src =
8283
-- important that the URI's we produce have been properly normalized, otherwise they point at weird places in VS Code
83-
Location (fromNormalizedUri $ filePathToUri' $ toNormalizedFilePath $ srcSpanToFilename src) (srcSpanToRange src)
84+
Location (fromNormalizedUri $ filePathToUri' $ toNormalizedFilePath' $ srcSpanToFilename src) (srcSpanToRange src)
8485

8586
isInsideSrcSpan :: Position -> SrcSpan -> Bool
8687
p `isInsideSrcSpan` r = sp <= p && p <= ep

src/Development/IDE/GHC/Util.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ moduleImportPath (takeDirectory . fromNormalizedFilePath -> pathDir) pm
139139
-- A for module A.B
140140
modDir =
141141
takeDirectory $
142-
fromNormalizedFilePath $ toNormalizedFilePath $
142+
fromNormalizedFilePath $ toNormalizedFilePath' $
143143
moduleNameSlashes $ GHC.moduleName mod'
144144

145145
-- | An 'HscEnv' with equality. Two values are considered equal

src/Development/IDE/Import/FindImports.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ locateModuleFile :: MonadIO m
5858
-> m (Maybe NormalizedFilePath)
5959
locateModuleFile dflags exts doesExist isSource modName = do
6060
let candidates =
61-
[ toNormalizedFilePath (prefix </> M.moduleNameSlashes modName <.> maybeBoot ext)
61+
[ toNormalizedFilePath' (prefix </> M.moduleNameSlashes modName <.> maybeBoot ext)
6262
| prefix <- importPaths dflags, ext <- exts]
6363
findM doesExist candidates
6464
where

src/Development/IDE/LSP/HoverDefinition.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ request label getResults notFound found ide (TextDocumentPositionParams (TextDoc
5555

5656
logAndRunRequest :: T.Text -> (NormalizedFilePath -> Position -> Action b) -> IdeState -> Position -> String -> IO b
5757
logAndRunRequest label getResults ide pos path = do
58-
let filePath = toNormalizedFilePath path
58+
let filePath = toNormalizedFilePath' path
5959
logInfo (ideLogger ide) $
6060
label <> " request at position " <> T.pack (showPosition pos) <>
6161
" in file: " <> T.pack path

src/Development/IDE/LSP/Notifications.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import Development.IDE.Core.OfInterest
3030

3131

3232
whenUriFile :: Uri -> (NormalizedFilePath -> IO ()) -> IO ()
33-
whenUriFile uri act = whenJust (LSP.uriToFilePath uri) $ act . toNormalizedFilePath
33+
whenUriFile uri act = whenJust (LSP.uriToFilePath uri) $ act . toNormalizedFilePath'
3434

3535
setHandlersNotifications :: PartialHandlers c
3636
setHandlersNotifications = PartialHandlers $ \WithMessage{..} x -> return x
@@ -62,7 +62,7 @@ setHandlersNotifications = PartialHandlers $ \WithMessage{..} x -> return x
6262
let events =
6363
mapMaybe
6464
(\(FileEvent uri ev) ->
65-
(, ev /= FcDeleted) . toNormalizedFilePath
65+
(, ev /= FcDeleted) . toNormalizedFilePath'
6666
<$> LSP.uriToFilePath uri
6767
)
6868
( F.toList fileEvents )

src/Development/IDE/LSP/Outline.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ moduleOutline
3737
:: LSP.LspFuncs c -> IdeState -> DocumentSymbolParams -> IO (Either ResponseError DSResult)
3838
moduleOutline _lsp ideState DocumentSymbolParams { _textDocument = TextDocumentIdentifier uri }
3939
= case uriToFilePath uri of
40-
Just (toNormalizedFilePath -> fp) -> do
40+
Just (toNormalizedFilePath' -> fp) -> do
4141
mb_decls <- runAction ideState $ use GetParsedModule fp
4242
pure $ Right $ case mb_decls of
4343
Nothing -> DSDocumentSymbols (List [])

src/Development/IDE/Plugin/CodeAction.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ codeAction lsp state (TextDocumentIdentifier uri) _range CodeActionContext{_diag
6464
-- logInfo (ideLogger ide) $ T.pack $ "Code action req: " ++ show arg
6565
contents <- LSP.getVirtualFileFunc lsp $ toNormalizedUri uri
6666
let text = Rope.toText . (_text :: VirtualFile -> Rope.Rope) <$> contents
67-
mbFile = toNormalizedFilePath <$> uriToFilePath uri
67+
mbFile = toNormalizedFilePath' <$> uriToFilePath uri
6868
(ideOptions, parsedModule, join -> env) <- runAction state $
6969
(,,) <$> getIdeOptions
7070
<*> getParsedModule `traverse` mbFile
@@ -85,7 +85,7 @@ codeLens
8585
-> IO (Either ResponseError (List CodeLens))
8686
codeLens _lsp ideState CodeLensParams{_textDocument=TextDocumentIdentifier uri} = do
8787
fmap (Right . List) $ case uriToFilePath' uri of
88-
Just (toNormalizedFilePath -> filePath) -> do
88+
Just (toNormalizedFilePath' -> filePath) -> do
8989
_ <- runAction ideState $ runMaybeT $ useE TypeCheck filePath
9090
diag <- getDiagnostics ideState
9191
hDiag <- getHiddenDiagnostics ideState

src/Development/IDE/Plugin/Completions.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ getCompletionsLSP lsp ide
6666
contents <- LSP.getVirtualFileFunc lsp $ toNormalizedUri uri
6767
fmap Right $ case (contents, uriToFilePath' uri) of
6868
(Just cnts, Just path) -> do
69-
let npath = toNormalizedFilePath path
69+
let npath = toNormalizedFilePath' path
7070
(ideOpts, compls) <- runAction ide $ do
7171
opts <- getIdeOptions
7272
compls <- useWithStale ProduceCompletions npath

src/Development/IDE/Plugin/Completions/Logic.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ occNameToComKind ty oc
132132

133133
mkCompl :: IdeOptions -> CompItem -> CompletionItem
134134
mkCompl IdeOptions{..} CI{origName,importedFrom,thingType,label,isInfix,docs} =
135-
CompletionItem label kind ((colon <>) <$> typeText)
135+
CompletionItem label kind (List []) ((colon <>) <$> typeText)
136136
(Just $ CompletionDocMarkup $ MarkupContent MkMarkdown $ T.intercalate sectionSeparator docs')
137137
Nothing Nothing Nothing Nothing (Just insertText) (Just Snippet)
138138
Nothing Nothing Nothing Nothing Nothing
@@ -186,27 +186,27 @@ getArgText typ = argText
186186

187187
mkModCompl :: T.Text -> CompletionItem
188188
mkModCompl label =
189-
CompletionItem label (Just CiModule) Nothing
189+
CompletionItem label (Just CiModule) (List []) Nothing
190190
Nothing Nothing Nothing Nothing Nothing Nothing Nothing
191191
Nothing Nothing Nothing Nothing Nothing
192192

193193
mkImportCompl :: T.Text -> T.Text -> CompletionItem
194194
mkImportCompl enteredQual label =
195-
CompletionItem m (Just CiModule) (Just label)
195+
CompletionItem m (Just CiModule) (List []) (Just label)
196196
Nothing Nothing Nothing Nothing Nothing Nothing Nothing
197197
Nothing Nothing Nothing Nothing Nothing
198198
where
199199
m = fromMaybe "" (T.stripPrefix enteredQual label)
200200

201201
mkExtCompl :: T.Text -> CompletionItem
202202
mkExtCompl label =
203-
CompletionItem label (Just CiKeyword) Nothing
203+
CompletionItem label (Just CiKeyword) (List []) Nothing
204204
Nothing Nothing Nothing Nothing Nothing Nothing Nothing
205205
Nothing Nothing Nothing Nothing Nothing
206206

207207
mkPragmaCompl :: T.Text -> T.Text -> CompletionItem
208208
mkPragmaCompl label insertText =
209-
CompletionItem label (Just CiKeyword) Nothing
209+
CompletionItem label (Just CiKeyword) (List []) Nothing
210210
Nothing Nothing Nothing Nothing Nothing (Just insertText) (Just Snippet)
211211
Nothing Nothing Nothing Nothing Nothing
212212

src/Development/IDE/Types/Diagnostics.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ ideErrorText fp msg = (fp, ShowDiag, LSP.Diagnostic {
3838
_code = Nothing,
3939
_source = Just "compiler",
4040
_message = msg,
41-
_relatedInformation = Nothing
41+
_relatedInformation = Nothing,
42+
_tags = Nothing
4243
})
4344

4445
-- | Defines whether a particular diagnostic should be reported

0 commit comments

Comments
 (0)