summaryrefslogtreecommitdiff
path: root/tests/unurlify2.ur
blob: 2e82928d45139c409824ef333dd6a0dac73f568a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
datatype bugged = Nothing | Something of int
datatype myDt = One | Two
type myRecord = {Bugged: bugged
               , MyDt : myDt}

fun rpcTarget (t: myRecord) = return ()

val good = {Bugged = Something 4, MyDt = One}
val bad = {Bugged = Nothing, MyDt = One}

fun main () : transaction page = return <xml>
  <body>
    <button onclick={fn _ => rpc (rpcTarget good)}>rpc with good</button>
    <button onclick={fn _ => rpc (rpcTarget bad)}>rpc with bad</button>
  </body>
</xml>