From 85149f78f3c822b520fcd872d3b74be041f911ab Mon Sep 17 00:00:00 2001 From: Brian Campbell Date: Mon, 20 Nov 2017 14:42:16 +0000 Subject: Look up the right type variables in monomorphisation analysis --- src/monomorphise.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/monomorphise.ml b/src/monomorphise.ml index 1a99b3d0..a1a02b57 100644 --- a/src/monomorphise.ml +++ b/src/monomorphise.ml @@ -1970,6 +1970,8 @@ let rec analyse_exp env assigns (E_aux (e,(l,annot)) as exp) = | E_app (id,args) -> let deps, assigns, r = non_det args in let kid_inst = instantiation_of exp in + (* Change kids in instantiation to the canonical ones from the type signature *) + let kid_inst = KBindings.fold (fun kid -> KBindings.add (orig_kid kid)) kid_inst KBindings.empty in let kid_deps = KBindings.map (deps_of_uvar env.kid_deps deps) kid_inst in let r' = { empty with split_on_call = Bindings.singleton id (deps, kid_deps) } in (merge_deps deps, assigns, merge r r') -- cgit v1.2.3