summaryrefslogtreecommitdiff
path: root/tests/lessSafeFfi.ur
blob: da79bfdc697f9579d9aa2b47912acded3a002974 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
ffi foo : int -> int
ffi bar serverOnly benignEffectful : int -> transaction unit
ffi baz : transaction int

ffi bup jsFunc "jsbup" : int -> transaction unit

fun other () : transaction page =
    (*bar 17;
    q <- baz;*)
    return <xml><body>
      (*{[foo 42]}, {[q]}*)
      <button onclick={fn _ => bup 32}/>
    </body></xml>

fun main () = return <xml><body>
  <form>
    <submit action={other}/>
  </form>
</body></xml>