Skip to content

Commit b4b1aaa

Browse files
committed
Value: iterNValueM: upd fixpont implementation
1 parent a99a27c commit b4b1aaa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Nix/Value.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,10 +527,9 @@ iterNValueM
527527
-> (NValue' t f m (n r) -> n r)
528528
-> NValue t f m
529529
-> n r
530-
iterNValueM transform k f =
531-
iterM f <=< go . (k (iterNValueM transform k f) <$>)
530+
iterNValueM transform k f = fix (((iterM f <=< go) .) . fmap . k)
532531
where
533-
go (Pure x) = Pure <$> x
532+
go (Pure x) = Pure <$> x -- It should be a 'sequenceA' if to remote 'transform' form function.
534533
go (Free fa) = Free <$> bindNValue' transform go fa
535534

536535
-- *** Utils

0 commit comments

Comments
 (0)