Skip to main content

💥 Internal_errors.v

Translated OCaml

Gitlab , OCaml

File generated by coq-of-ocaml
Require Import CoqOfOCaml.CoqOfOCaml.
Require Import CoqOfOCaml.Settings.

Require Import TezosOfOCaml.Environment.V8.

Definition do_assert (b_value : bool) : M? unit :=
  if b_value then
    Error_monad.Result_syntax.return_unit
  else
    Error_monad.error_value (Build_extensible "Asserted" unit tt).

Definition ignore_errors {a : Set} (x_value : M? a) : a :=
  match x_value with
  | Pervasives.Ok x_valuex_value
  | Pervasives.Error _
    (* ❌ Assert instruction is not handled. *)
    assert a false
  end.