summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKathy Gray2016-03-09 15:30:09 +0000
committerKathy Gray2016-03-09 15:30:09 +0000
commit8037d18d935f14cd062f24b0244efed3f7260c31 (patch)
treee3a9c7a7063265389d27437562dc64bec5595f88
parent97a198bd7ae5b28c8cf25b4eadba9924bd07aa5e (diff)
Refine previous fix... tags can be subtle :(
-rw-r--r--src/type_check.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type_check.ml b/src/type_check.ml
index e34b0716..e6c11eb1 100644
--- a/src/type_check.ml
+++ b/src/type_check.ml
@@ -530,7 +530,7 @@ let rec check_exp envs (imp_param:nexp option) (widen:bool) (expect_t:t) (E_aux(
| Tfn _,_ -> typ_error l
("Identifier " ^ (id_to_string id) ^ " is bound to a function and cannot be used as a value")
| Tapp("register",[TA_typ(t')]),Tapp("register",[TA_typ(expect_t')]) ->
- let tannot = Base(([],t),tag,cs,pure_e,pure_e,bounds) in
+ let tannot = Base(([],t),(match tag with | External _ -> Emp_global | _ -> tag),cs,pure_e,pure_e,bounds) in
let t',cs' = type_consistent (Expr l) d_env Require false t' expect_t' in
(rebuild tannot,t,t_env,cs@cs',bounds,ef)
| Tapp("register",[TA_typ(t')]),Tuvar _ ->