From 9041a82606481750788ff5088021e39a4b9b3a6a Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Thu, 10 Mar 2016 14:03:51 +0000 Subject: small bug in is_one tag fixed --- src/type_internal.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/type_internal.ml b/src/type_internal.ml index 5da8b40b..6f5d2002 100644 --- a/src/type_internal.ml +++ b/src/type_internal.ml @@ -3178,14 +3178,15 @@ let rec type_coerce_internal co d_env enforce is_explicit widen bounds t1 cs1 e | Tapp("range",[TA_nexp b1;TA_nexp r1;]),Tid("bit") -> let t',cs'= type_consistent co d_env enforce false t1 {t=Tapp("range",[TA_nexp n_zero;TA_nexp n_one])} in let efr = get_cummulative_effects (get_eannot e) - in (t2,cs',pure_e,E_aux(E_if(E_aux(E_app(Id_aux(Id "is_one",l),[e]),(l, simple_annot_efr bit_t efr)), + in (t2,cs',pure_e,E_aux(E_if(E_aux(E_app(Id_aux(Id "is_one",l),[e]), + (l, tag_annot_efr bit_t (External (Some "is_one")) efr)), E_aux(E_lit(L_aux(L_one,l)),(l,simple_annot bit_t)), E_aux(E_lit(L_aux(L_zero,l)),(l,simple_annot bit_t))), (l,simple_annot_efr bit_t efr))) | Tapp("atom",[TA_nexp b1]),Tid("bit") -> let t',cs'= type_consistent co d_env enforce false t1 {t=Tapp("range",[TA_nexp n_zero;TA_nexp n_one])} in let efr = get_cummulative_effects (get_eannot e) - in (t2,cs',pure_e,E_aux(E_if(E_aux(E_app(Id_aux(Id "is_one",l),[e]),(l, simple_annot_efr bit_t efr)), + in (t2,cs',pure_e,E_aux(E_if(E_aux(E_app(Id_aux(Id "is_one",l),[e]),(l, tag_annot_efr bit_t (External None) efr)), E_aux(E_lit(L_aux(L_one,l)),(l,simple_annot bit_t)), E_aux(E_lit(L_aux(L_zero,l)),(l,simple_annot bit_t))), (l,simple_annot_efr bit_t efr))) -- cgit v1.2.3