VarVarBind: add missing cleaning sub-calls

This commit is contained in:
Théophile Bastian 2018-02-16 15:10:03 +01:00
parent b1e82638b2
commit 63f8b6b61a
1 changed files with 2 additions and 2 deletions

View File

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