view tests/radio.ur @ 1888:5f478ecf65e4

Identify more local definitions as functions that should be lifted to the top level, which has synergistic effects on inlining later
author Adam Chlipala <adam@chlipala.net>
date Tue, 05 Nov 2013 11:58:52 -0500
parents a1a1d66aebac
children
line wrap: on
line source
fun handler x = return <xml><body>
  You entered: {[case x.A of
                     None => "nothing at all"
                   | Some v => v]}
</body></xml>

fun main () = return <xml><body>
  <form>
    <radio{#A}>
      <li><radioOption value="A"/>A</li>
      <li><radioOption value="B"/>B</li>
    </radio>
    <submit action={handler}/>
  </form>
</body></xml>