Skip to content

Commit 6a15a08

Browse files
committed
Repl: m refactor
1 parent de66704 commit 6a15a08

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

main/Repl.hs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,7 @@ completeFunc reversedPrev word
363363
Nothing -> pure []
364364
Just binding -> do
365365
candidates <- lift $ algebraicComplete subFields binding
366-
pure
367-
$ fmap notFinished
368-
$ listCompletion (Data.Text.unpack . (var <>) <$> candidates)
366+
pure $ notFinished <$> listCompletion (Data.Text.unpack . (var <>) <$> candidates)
369367

370368
-- Builtins, context variables
371369
| otherwise
@@ -377,8 +375,8 @@ completeFunc reversedPrev word
377375

378376
pure $ listCompletion
379377
$ ["__includes"]
380-
++ (Data.Text.unpack <$> contextKeys)
381-
++ (Data.Text.unpack <$> shortBuiltins)
378+
<> (Data.Text.unpack <$> contextKeys)
379+
<> (Data.Text.unpack <$> shortBuiltins)
382380

383381
where
384382
listCompletion = fmap simpleCompletion . filter (word `Data.List.isPrefixOf`)
@@ -401,7 +399,7 @@ completeFunc reversedPrev word
401399
Nothing -> pure []
402400
Just e ->
403401
demand e
404-
(\e' -> fmap (("." <> f) <>) <$> algebraicComplete fs e')
402+
(\e' -> (fmap . fmap) (("." <> f) <>) $ algebraicComplete fs e')
405403

406404
in case val of
407405
NVSet xs _ -> withMap xs

0 commit comments

Comments
 (0)