aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/boot/me/type.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/boot/me/type.ml b/src/boot/me/type.ml
index 434bab7e..e2295e4c 100644
--- a/src/boot/me/type.ml
+++ b/src/boot/me/type.ml
@@ -223,8 +223,8 @@ let type_error_full expected actual =
raise (Type_error (expected, actual))
;;
-let type_error expected actual =
- type_error_full expected (head_only actual)
+let type_error cx expected actual =
+ type_error_full expected (friendly_stringify cx head_only actual)
;;
(* We explicitly curry [cx] like this to avoid threading it through all the
@@ -278,6 +278,8 @@ let check_stmt (cx:Semant.ctxt) : (fn_ctx -> Ast.stmt -> unit) =
* Type assertions
*)
+ let type_error = type_error cx in
+
let is_integer (ty:Ast.ty) =
match ty with
Ast.TY_int | Ast.TY_uint