From e0228f352ce59120b934dde9fd75950cb6f5b3ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Wed, 5 Jun 2019 14:26:01 +0200 Subject: [PATCH] fix build (my bad) --- src/transpiler/transpiler.ml | 6 +++--- src/typer/typer.ml | 4 ++-- vendors/ligo-utils/simple-utils/trace.ml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/transpiler/transpiler.ml b/src/transpiler/transpiler.ml index 47582e004..4b27b2dcc 100644 --- a/src/transpiler/transpiler.ml +++ b/src/transpiler/transpiler.ml @@ -603,7 +603,7 @@ let extract_constructor (v : value) (tree : _ Append_tree.t') : (string * value | Leaf (k, t), v -> ok (k, v, t) | Node {a}, D_left v -> aux (a, v) | Node {b}, D_right v -> aux (b, v) - | _ -> internal_assertion_fail "bad constructor path" + | _ -> fail @@ internal_assertion_failure "bad constructor path" in let%bind (s, v, t) = aux (tree, v) in ok (s, v, t) @@ -617,7 +617,7 @@ let extract_tuple (v : value) (tree : AST.type_value Append_tree.t') : ((value * let%bind a' = aux (a, va) in let%bind b' = aux (b, vb) in ok (a' @ b') - | _ -> internal_assertion_fail "bad tuple path" + | _ -> fail @@ internal_assertion_failure "bad tuple path" in aux (tree, v) @@ -630,7 +630,7 @@ let extract_record (v : value) (tree : _ Append_tree.t') : (_ list) result = let%bind a' = aux (a, va) in let%bind b' = aux (b, vb) in ok (a' @ b') - | _ -> internal_assertion_fail "bad record path" + | _ -> fail @@ internal_assertion_failure "bad record path" in aux (tree, v) diff --git a/src/typer/typer.ml b/src/typer/typer.ml index 643196e79..0f4c6d0a9 100644 --- a/src/typer/typer.ml +++ b/src/typer/typer.ml @@ -714,7 +714,7 @@ and type_expression : environment -> ?tv_opt:O.type_value -> I.expression -> O.a O.merge_annotation (Some tv) (Some expr'.type_annotation) - (internal_assertion_fail "merge_annotations (Some ...) (Some ...) failed") in + (internal_assertion_failure "merge_annotations (Some ...) (Some ...) failed") in ok {expr' with type_annotation} @@ -729,7 +729,7 @@ and type_constant (name:string) (lst:O.type_value list) (tv_opt:O.type_value opt let untype_type_value (t:O.type_value) : (I.type_expression) result = match t.simplified with | Some s -> ok s - | _ -> internal_assertion_fail "trying to untype generated type" + | _ -> fail @@ internal_assertion_failure "trying to untype generated type" let untype_literal (l:O.literal) : I.literal result = let open I in diff --git a/vendors/ligo-utils/simple-utils/trace.ml b/vendors/ligo-utils/simple-utils/trace.ml index 4669f07a1..582347eae 100644 --- a/vendors/ligo-utils/simple-utils/trace.ml +++ b/vendors/ligo-utils/simple-utils/trace.ml @@ -200,7 +200,7 @@ let prepend_info = fun info err -> let simple_error str () = mk_error ~title:(thunk str) () let simple_info str () = mk_info ~title:(thunk str) () let simple_fail str = fail @@ simple_error str -let internal_assertion_fail str = fail @@ simple_error ("assertion failed: " ^ str) +let internal_assertion_failure str = simple_error ("assertion failed: " ^ str) (** To be used when you only want to signal an error. It can be useful when