Skip to content

Commit ab79e36

Browse files
committed
Add missing prefix
1 parent 0a70964 commit ab79e36

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE GADTs #-}
23
{-# LANGUAGE OverloadedStrings #-}
34
{-# LANGUAGE RecordWildCards #-}
@@ -10,7 +11,11 @@ import qualified Data.Aeson.Types as A
1011
import Data.Default (def)
1112
import qualified Data.Dependent.Map as DMap
1213
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
1419
import Data.List (nub)
1520
import Ide.Plugin.Config
1621
import Ide.Plugin.Properties (toDefaultJSON, toVSCodeExtensionSchema)
@@ -26,9 +31,9 @@ import Language.LSP.Types
2631
pluginsToDefaultConfig :: IdePlugins a -> A.Value
2732
pluginsToDefaultConfig IdePlugins {..} =
2833
A.Object $
29-
HMap.adjust
34+
Map.alter
3035
( \(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
3237
)
3338
"haskell"
3439
(unsafeValueToObject (A.toJSON defaultConfig))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ toKey :: String -> A.Key
172172
toKey = A.Key.fromString
173173
#else
174174
toKey :: String -> T.Text
175-
toKey = pack
175+
toKey = T.pack
176176
#endif
177177

178178
emptyProperties :: Properties '[]

0 commit comments

Comments
 (0)