summaryrefslogtreecommitdiff
path: root/test/ocaml/hello_world/hello_world.sail
blob: d96429f2eaf4e1c735f6794f8648ebb1046fd200 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
val unit -> string effect pure hello_world

function hello_world () = {
  return "Hello, World!";
  "Unreachable"
}

val unit -> unit effect {wreg, rreg} main

register string REG

function main () = {
  REG := "Hello, Sail!";
  print(REG);
  REG := hello_world ();
  print(REG);
  return ()
}