@@ -23,7 +23,7 @@ import Nix.Scope
2323import Nix.Utils
2424import Nix.Value.Monad ( demand )
2525
26- import qualified Data.HashMap.Lazy
26+ import qualified Data.HashMap.Lazy as M
2727import Data.Char ( isSpace )
2828import Data.List ( dropWhileEnd )
2929import qualified Data.Text as Text
@@ -163,7 +163,7 @@ initState mIni = do
163163
164164 let
165165 scope = coerce $
166- Data.HashMap.Lazy . fromList $
166+ M . fromList $
167167 (" builtins" , builtins) : fmap (" input" ,) (maybeToList mIni)
168168
169169 opts :: Nix. Options <- asks $ view hasLens
@@ -295,7 +295,7 @@ browse _ =
295295 liftIO $ Text. putStr $ coerce k <> " = "
296296 printValue v
297297 )
298- (Data.HashMap.Lazy . toList $ coerce $ replCtx state)
298+ (M . toList $ coerce $ replCtx state)
299299
300300-- | @:load@ command
301301load
@@ -323,7 +323,7 @@ typeof args = do
323323 maybe
324324 (exec False line)
325325 (pure . pure )
326- (Data.HashMap.Lazy .lookup (coerce line) (coerce $ replCtx state))
326+ (M .lookup (coerce line) (coerce $ replCtx state))
327327
328328 traverse_ printValueType mVal
329329
@@ -408,15 +408,15 @@ completeFunc reversedPrev word
408408 candidates
409409 )
410410 )
411- (Data.HashMap.Lazy .lookup (coerce var) (coerce $ replCtx state))
411+ (M .lookup (coerce var) (coerce $ replCtx state))
412412
413413 -- Builtins, context variables
414414 | otherwise =
415415 do
416416 state <- get
417- let contextKeys = Data.HashMap.Lazy . keys @ VarName @ (NValue t f m ) (coerce $ replCtx state)
418- (Just (NVSet _ builtins)) = Data.HashMap.Lazy .lookup " builtins" (coerce $ replCtx state)
419- shortBuiltins = Data.HashMap.Lazy . keys builtins
417+ let contextKeys = M . keys @ VarName @ (NValue t f m ) (coerce $ replCtx state)
418+ (Just (NVSet _ builtins)) = M .lookup " builtins" (coerce $ replCtx state)
419+ shortBuiltins = M . keys builtins
420420
421421 pure $ listCompletion $ toString <$>
422422 [" __includes" ]
@@ -435,7 +435,7 @@ completeFunc reversedPrev word
435435 -> m [Text ]
436436 algebraicComplete subFields val =
437437 let
438- keys = fmap (" ." <> ) . Data.HashMap.Lazy . keys
438+ keys = fmap (" ." <> ) . M . keys
439439
440440 withMap m =
441441 case subFields of
@@ -449,10 +449,10 @@ completeFunc reversedPrev word
449449 ((" ." <> f) <> )
450450 . algebraicComplete fs <=< demand
451451 )
452- (Data.HashMap.Lazy .lookup (coerce f) m)
452+ (M .lookup (coerce f) m)
453453 in
454454 case val of
455- NVSet _ xs -> withMap (Data.HashMap.Lazy . mapKeys coerce xs)
455+ NVSet _ xs -> withMap (M . mapKeys coerce xs)
456456 _ -> stub
457457
458458-- | HelpOption inspired by Dhall Repl
0 commit comments