diff --git a/src/VarVarBind.ml b/src/VarVarBind.ml index 3885f18..34dc883 100644 --- a/src/VarVarBind.ml +++ b/src/VarVarBind.ml @@ -29,7 +29,7 @@ let rec clean_term map_env = function | S.LetVal (name, S.VVar subVar, next) -> clean_term (Env.add name (clean_var map_env subVar) map_env) next | S.LetVal (name, value, next) -> - S.LetVal (name, value, clean_term map_env next) + S.LetVal (name, clean_value map_env value, clean_term map_env next) | S.LetBlo (name, S.Con(tag, args), next) -> S.LetBlo( name, @@ -48,7 +48,7 @@ let rec clean_term map_env = function and clean_branch map_env (S.Branch(tag, args, body)) = S.Branch( tag, - args, + List.map (clean_var map_env) args, clean_term map_env body) let clean_function (S.Fun(name, args, body)) =