summaryrefslogtreecommitdiff
path: root/test/c/poly_simple.sail
blob: 6630c63852f0cf896aa62d44a66ab8237227dd11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
default Order dec

val "print" : string -> unit

union Poly ('a : Type) = {
  Ctor : 'a
}

function main() : unit -> unit = {
  let x = Ctor(3 : int);
  let y = Ctor("Hello, World!\n");
  match y {
    Ctor(str) => print(str)
  }
}