view tests/testHtml.ur @ 28:f55f66c6fdee

Migrate ap method to Record module.
author Edward Z. Yang <ezyang@mit.edu>
date Thu, 26 Jul 2012 16:48:37 -0400
parents 8eaaca74a64c
children
line wrap: on
line source
open Parse
open Html

val parser = format (b, i, a)

fun parse r =
    case parser r.Source of
        Failure s => error <xml>Bad HTML: {[s]}</xml>
      | Success x => return <xml><body>
        <h1>Here it is:</h1>

        {x}
      </body></xml>

fun main () = return <xml><body>
  <form> <textarea{#Source}/> <submit action={parse}/> </form>
</body></xml>