view demo/url.ur @ 2190:22117edf8fd3

After a tricky debugging session, limit visibility of type-class instances from anonymous modules
author Adam Chlipala <>
date Sun, 01 Nov 2015 16:33:14 -0500
parents 412ccd97ab71
line wrap: on
line source
fun yourChoice r = return <xml><body>
  {case checkUrl r.Url of
       None => <xml>You aren't allowed to link to there.</xml>
     | Some url => <xml><a href={url}>Enjoy!</a></xml>}

fun main () = return <xml><body>
  <a href="">Learn something</a><br/>
    URL of your choice: <textbox{#Url}/> <submit action={yourChoice}/>