From f8abc90f5e7ae8e25f2750a186eee2ef30021cf5 Mon Sep 17 00:00:00 2001 From: Jon French Date: Mon, 30 Apr 2018 15:18:56 +0100 Subject: further progress but confounds the type checker? --- test/ocaml/prelude.sail | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/ocaml/prelude.sail b/test/ocaml/prelude.sail index a9004297..54c88cb8 100644 --- a/test/ocaml/prelude.sail +++ b/test/ocaml/prelude.sail @@ -17,11 +17,15 @@ val eq_int = "eq_int" : (int, int) -> bool val eq_vec = "eq_list" : forall 'n. (bits('n), bits('n)) -> bool +union option ('a : Type) = {None : unit, Some : 'a} + val eq_string = "eq_string" : (string, string) -> bool val string_startswith = "string_startswith" : (string, string) -> bool val string_drop = "string_drop" : (string, nat) -> string val string_length = "string_length" : string -> nat val string_append = "string_append" : (string, string) -> string +val maybe_int_of_prefix = "maybe_int_of_prefix" : string -> option((int, nat)) +val maybe_nat_of_prefix = "maybe_nat_of_prefix" : string -> option((nat, nat)) val eq_real = "eq_real" : (real, real) -> bool -- cgit v1.2.3