summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Campbell2018-02-14 17:07:46 +0000
committerBrian Campbell2018-02-14 17:07:46 +0000
commit23e4a6318260b38be4549ec7bbfab76dbb5eab13 (patch)
tree7f73fe02d50990021b4f78e9b99c997175dd5b97 /src
parent56a746f45ae815b5e66c2c73d46ab04eceb7a9fb (diff)
Support monorphisation analysis of bitvectors inside existentials
Diffstat (limited to 'src')
-rw-r--r--src/monomorphise.ml11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/monomorphise.ml b/src/monomorphise.ml
index 3af1c242..4f8fc257 100644
--- a/src/monomorphise.ml
+++ b/src/monomorphise.ml
@@ -2843,8 +2843,15 @@ let rec analyse_exp fn_id env assigns (E_aux (e,(l,annot)) as exp) =
match annot with
| None -> r
| Some (tenv,typ,_) ->
- (* TODO: existential wrappers *)
- let typ = Env.expand_synonyms tenv typ in
+ let typ = Env.base_typ_of tenv typ in
+ let env, typ =
+ match destruct_exist tenv typ with
+ | None -> env, typ
+ | Some (kids, nc, typ) ->
+ { env with kid_deps =
+ List.fold_left (fun kds kid -> KBindings.add kid deps kds) env.kid_deps kids },
+ typ
+ in
if is_bitvector_typ typ then
let _,size,_,_ = vector_typ_args_of typ in
let Nexp_aux (size,_) as size_nexp = simplify_size_nexp env tenv size in