summaryrefslogtreecommitdiff
path: root/src/return_analysis.ml
diff options
context:
space:
mode:
authorAlasdair2018-12-08 01:06:28 +0000
committerAlasdair2018-12-08 02:48:04 +0000
commitd8f0854ca9d80d3af8d6a4aaec778643eda9421c (patch)
treed7d64ccbc3e972ceae549080f62c0c036452c6a6 /src/return_analysis.ml
parent2c25110ad2f5e636239ba65a2154aae79ffa253c (diff)
Compiling again
Change Typ_arg_ to A_. We use it a lot more now typ_arg is used instead of uvar as the result of unify. Plus A_ could either stand for argument, or Any/A type which is quite appropriate in most use cases. Restore instantiation info in infer_funapp'. Ideally we would save this instead of recomputing it ever time we need it. However I checked and there are over 300 places in the code that would need to be changed to add an extra argument to E_app. Still some issues causing specialisation to fail however. Improve the error message when we swap how we infer/check an l-expression, as this could previously cause the actual cause of a type-checking failure to be effectively hidden.
Diffstat (limited to 'src/return_analysis.ml')
-rw-r--r--src/return_analysis.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/return_analysis.ml b/src/return_analysis.ml
index 06565b01..256f97cf 100644
--- a/src/return_analysis.ml
+++ b/src/return_analysis.ml
@@ -110,7 +110,7 @@ let existentialize_annot funcl_annot annot =
let funcl_env = env_of_annot funcl_annot in
let env = env_of_annot annot in
match Env.expand_synonyms env (typ_of_annot annot) with
- | (Typ_aux (Typ_app (ty_id, [Typ_arg_aux (Typ_arg_nexp nexp, _)]), _) as typ)
+ | (Typ_aux (Typ_app (ty_id, [A_aux (A_nexp nexp, _)]), _) as typ)
when Id.compare ty_id (mk_id "atom") = 0 ->
let tyvars = Env.get_typ_vars funcl_env |> KBindings.bindings in
let toplevel_kids =