~jojo/Carth

5a1f3d525f560c3ed1b1ee6cbbf97d7db6845636 — JoJo 1 year, 6 months ago 0dfbe06
Fix subst not applied to accesses of varbindings of DLeaf
1 files changed, 5 insertions(+), 1 deletions(-)

M src/Subst.hs
M src/Subst.hs => src/Subst.hs +5 -1
@@ 41,7 41,11 @@ substDecisionTree s = \case
        (substAccess s obj)
        (fmap (substDecisionTree s) cs)
        (substDecisionTree s def)
    DLeaf (bs, e) -> DLeaf (Map.mapKeys (substTypedVar s) bs, substExpr s e)
    DLeaf (bs, e) -> DLeaf
        ( Map.fromList
            (map (bimap (substTypedVar s) (substAccess s)) (Map.toList bs))
        , substExpr s e
        )

substAccess :: Subst -> Access -> Access
substAccess s = \case