From d8f0854ca9d80d3af8d6a4aaec778643eda9421c Mon Sep 17 00:00:00 2001 From: Alasdair Date: Sat, 8 Dec 2018 01:06:28 +0000 Subject: 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. --- src/return_analysis.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/return_analysis.ml') 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 = -- cgit v1.2.3