aboutsummaryrefslogtreecommitdiff
path: root/interp
diff options
context:
space:
mode:
authorGaëtan Gilbert2020-11-15 21:08:11 +0100
committerGaëtan Gilbert2020-11-15 21:08:11 +0100
commit81a3f81c046697ff011c93929c75c29f4cd39f2f (patch)
tree9fc7335c43cf9d562c299c6cd3b88df5395ded3e /interp
parent41523921f8838f09ba2365d2083b31143ba35517 (diff)
Intern application arguments in left-to-right order
This makes it so that we have an application `h a b` with both `a` and `b` unbound, `a` is the one that is reported (parent commit with my current compiler setup reports `b` first, and the code does not define which it should be). Ideally we would report both but that requires more code.
Diffstat (limited to 'interp')
-rw-r--r--interp/constrintern.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml
index 378617af04..9f10991510 100644
--- a/interp/constrintern.ml
+++ b/interp/constrintern.ml
@@ -2405,8 +2405,9 @@ let internalize globalenv env pattern_mode (_, ntnvars as lvar) c =
and intern_args env subscopes = function
| [] -> []
| a::args ->
- let (enva,subscopes) = apply_scope_env env subscopes in
- (intern_no_implicit enva a) :: (intern_args env subscopes args)
+ let (enva,subscopes) = apply_scope_env env subscopes in
+ let a = intern_no_implicit enva a in
+ a :: (intern_args env subscopes args)
in
intern env c