Skip to content

Commit

Permalink
Fix clone in subsHoles (#2504)
Browse files Browse the repository at this point in the history
Fix `clone` (it was in the wrong place) introduced in
#2501
  • Loading branch information
lukaszcz authored Nov 8, 2023
1 parent 68d4314 commit 4f2382d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Juvix/Compiler/Internal/Extra/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ subsHoles s = leafExpressions helper
where
helper :: Expression -> Sem r Expression
helper e = case e of
ExpressionHole h -> maybe (clone e) return (s ^. at h)
ExpressionInstanceHole h -> maybe (clone e) return (s ^. at h)
ExpressionHole h -> clone (fromMaybe e (s ^. at h))
ExpressionInstanceHole h -> clone (fromMaybe e (s ^. at h))
_ -> return e

instance HasExpressions Example where
Expand Down

0 comments on commit 4f2382d

Please sign in to comment.