summaryrefslogtreecommitdiff
path: root/test/c/special_annot.sail
blob: ca2f5f4c01babf5b75c4fdf154a8578811f777e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
union option ('a : Type) = {
  None : unit,
  Some : 'a
}

val test : forall ('a : Type). 'a -> option('a)

function test(x) =
  let y : 'a = x in Some(y)

val "print_endline" : string -> unit

val main : unit -> unit

function main() = {
  let Some(y) = test("string");
  print_endline(y)
}