diff options
| author | Alasdair Armstrong | 2017-11-03 18:15:40 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2017-11-03 18:15:40 +0000 |
| commit | e43324b207b13d7e4094e2561b4e4a84c76e1299 (patch) | |
| tree | ec3ecf746ac66b13c74cba328536759a4dd0a82a /test/ocaml/loop | |
| parent | 31d548faa0388fc517f2d2ccaee894a71d29698a (diff) | |
Fix ocaml test suite
Diffstat (limited to 'test/ocaml/loop')
| -rw-r--r-- | test/ocaml/loop/loop.sail | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/test/ocaml/loop/loop.sail b/test/ocaml/loop/loop.sail index 5ab0e817..3808c19a 100644 --- a/test/ocaml/loop/loop.sail +++ b/test/ocaml/loop/loop.sail @@ -1,18 +1,19 @@ +val string_of_int = "string_of_big_int" : int -> string -val extern int -> string effect pure string_of_int = "string_of_big_int" +val add = "add" : (int, int) -> int -val extern (int, int) -> int effect pure add = "add" -val extern (int, int) -> bool effect pure lt = "lt_int" +val lt = "lt_int" : (int, int) -> bool -overload (deinfix +) [add] -overload (deinfix <) [lt] +overload operator + = {add} -val unit -> unit effect pure main +overload operator < = {lt} + +val main : unit -> unit function main () = { - (int) x := 0; + x : int = 0; while x < 100 do { - x := x + 1; + x = x + 1; print(string_of_int(x)) } } |
