File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
ghcide/src/Development/IDE/Types Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,16 @@ ideErrorFromLspDiag lspDiag fdFilePath origMsg =
72
72
Nothing -> NoStructuredMessage
73
73
Just msg -> SomeStructuredMessage msg
74
74
fdLspDiagnostic = lspDiag
75
+ #if MIN_VERSION_ghc(9,6,1)
75
76
{ _code = fmap ghcCodeToLspCode . diagnosticCode . errMsgDiagnostic =<< origMsg
76
77
}
78
+ #endif
79
+ #if MIN_VERSION_ghc(9,8,1)
77
80
ghcCodeToLspCode :: DiagnosticCode -> Int32 LSP. |? T. Text
78
- #if MIN_VERSION_ghc(9,10,1)
79
81
ghcCodeToLspCode = InR . T. pack . show
80
- #else
82
+ #elif MIN_VERSION_ghc(9,6,1)
83
+ -- DiagnosticCode only got a show instance in 9.8.1
84
+ ghcCodeToLspCode :: DiagnosticCode -> Int32 LSP. |? T. Text
81
85
ghcCodeToLspCode (DiagnosticCode prefix c) = InR $ T. pack $ prefix ++ " -" ++ printf " %05d" c
82
86
#endif
83
87
in
You can’t perform that action at this time.
0 commit comments