summaryrefslogtreecommitdiff
path: root/test/coq/pass/foreach_using_tyvar.sail
blob: 8aabe00c23cc38bfd743e2014ce2c7a0b3204c9c (plain)
1
2
3
4
5
6
7
8
9
10
11
$include <arith.sail>

val f : forall 'n, 'n != 5. int('n) -> unit

val magic : forall 'n. int('n) -> bool effect {rreg}

val g : int -> unit effect {rreg}

function g(x) =
  foreach (n from 0 to x)
    if n != 5 & magic(n) then f(n)