diff options
| author | Brian Campbell | 2017-11-20 14:42:16 +0000 |
|---|---|---|
| committer | Brian Campbell | 2017-11-20 17:57:32 +0000 |
| commit | 85149f78f3c822b520fcd872d3b74be041f911ab (patch) | |
| tree | c10c8254ceaf70fe88fc123049661f740b575b09 /src | |
| parent | d1b97cab625bc52e269a8562b98adca038a503a6 (diff) | |
Look up the right type variables in monomorphisation analysis
Diffstat (limited to 'src')
| -rw-r--r-- | src/monomorphise.ml | 2 |
1 files changed, 2 insertions, 0 deletions
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') |
