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

ffi bup jsFunc "alert" : string -> transaction unit

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

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