summaryrefslogtreecommitdiff
path: root/src/test/test2.sail
blob: 57542d3f2a78191d6c904504a265c03f84dc724f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function nat id ( n ) = n

register (bit[5]) c

function unit f() = {
 (if( true ) then 
   a := (nat) (3 + 0b01) mod 4
  else 
   a := 4
 );
 c := (bit[5]) (3 + 0b00001) mod 2;
 b := a;
}

function nat effect pure main _ = {
  f();
  id(42);
}