diff options
author | Son Ho | 2022-03-03 17:36:33 +0100 |
---|---|---|
committer | Son Ho | 2022-03-03 17:36:33 +0100 |
commit | 00104884e101d3125e62dde9757b9c1cacb3feec (patch) | |
tree | 95714d86561013b328e00138f12bb9889576eca5 /src/Substitute.ml | |
parent | 80d0d22f152386ffe28b48f42f42f8f736170014 (diff) |
Make good progress on adding support for external and opaque
declarations
Diffstat (limited to 'src/Substitute.ml')
-rw-r--r-- | src/Substitute.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Substitute.ml b/src/Substitute.ml index 10d6d419..81f6985b 100644 --- a/src/Substitute.ml +++ b/src/Substitute.ml @@ -322,15 +322,15 @@ and switch_targets_substitute (tsubst : T.TypeVarId.id -> T.ety) (** Apply a type substitution to a function body. Return the local variables and the body. *) -let fun_decl_substitute_in_body (tsubst : T.TypeVarId.id -> T.ety) - (def : A.fun_decl) : A.var list * A.statement = +let fun_body_substitute_in_body (tsubst : T.TypeVarId.id -> T.ety) + (body : A.fun_body) : A.var list * A.statement = let rsubst r = r in let locals = List.map (fun v -> { v with A.var_ty = ty_substitute rsubst tsubst v.A.var_ty }) - def.A.locals + body.A.locals in - let body = statement_substitute tsubst def.body in + let body = statement_substitute tsubst body.body in (locals, body) (** Substitute a function signature *) |