Commit 5b42976b authored by Raphaël Cauderlier's avatar Raphaël Cauderlier
Browse files

Don't cast for check directive

parent 107305e5
......@@ -107,7 +107,7 @@ let print_line out_fmter = function
print_term def
| Tcheck (t, ty) ->
Format.fprintf out_fmter "@[#CHECK %a,@ dk_obj.Expr@ (%a).@]@\n"
print_term (Tcast (t, infer t, ty))
print_term t
print_ty ty
| Tnorm t ->
Format.fprintf out_fmter "@[#SNF %a.@]@\n"
......
......@@ -209,11 +209,7 @@ let type_line = function
| Stypedef (a, ty) -> Ttypedef (a, ty)
| Svardef (id, ty, def) -> Tvardef (id, ty, type_term [] def)
| Scheck (t, ty) ->
let tt = type_term [] t in
if subtype (infer tt) ty then
Tcheck (tt, ty)
else
raise Check_failed
let tt = type_check [] t ty in Tcheck (tt, ty)
| Snorm t -> Tnorm (type_term [] t)
let type_check = List.map type_line
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment