File tree 2 files changed +9
-4
lines changed
hls-plugin-api/src/Ide/Plugin
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE CPP #-}
1
2
{-# LANGUAGE GADTs #-}
2
3
{-# LANGUAGE OverloadedStrings #-}
3
4
{-# LANGUAGE RecordWildCards #-}
@@ -10,7 +11,11 @@ import qualified Data.Aeson.Types as A
10
11
import Data.Default (def )
11
12
import qualified Data.Dependent.Map as DMap
12
13
import qualified Data.Dependent.Sum as DSum
13
- import qualified Data.HashMap.Lazy as HMap
14
+ #if MIN_VERSION_aeson(2,0,0)
15
+ import qualified Data.Aeson.KeyMap as Map
16
+ #else
17
+ import qualified Data.HasMap.Lazy as Map
18
+ #endif
14
19
import Data.List (nub )
15
20
import Ide.Plugin.Config
16
21
import Ide.Plugin.Properties (toDefaultJSON , toVSCodeExtensionSchema )
@@ -26,9 +31,9 @@ import Language.LSP.Types
26
31
pluginsToDefaultConfig :: IdePlugins a -> A. Value
27
32
pluginsToDefaultConfig IdePlugins {.. } =
28
33
A. Object $
29
- HMap. adjust
34
+ Map. alter
30
35
( \ (unsafeValueToObject -> o) ->
31
- A. Object $ HMap . insert " plugin" elems o -- inplace the "plugin" section with our 'elems', leaving others unchanged
36
+ Just $ A. Object $ Map . insert " plugin" elems o -- inplace the "plugin" section with our 'elems', leaving others unchanged
32
37
)
33
38
" haskell"
34
39
(unsafeValueToObject (A. toJSON defaultConfig))
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ toKey :: String -> A.Key
172
172
toKey = A.Key. fromString
173
173
#else
174
174
toKey :: String -> T. Text
175
- toKey = pack
175
+ toKey = T. pack
176
176
#endif
177
177
178
178
emptyProperties :: Properties '[]
You can’t perform that action at this time.
0 commit comments