1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-13 19:49:20 +03:00

Fix clone in subsHoles (#2504)

Fix `clone` (it was in the wrong place) introduced in
https://github.com/anoma/juvix/pull/2501
This commit is contained in:
Łukasz Czajka 2023-11-08 15:02:21 +01:00 committed by GitHub
parent 68d4314c78
commit 4f2382df32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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