annotate tests/test.ur @ 3:f59083771ee2

Saving associations
author Adam Chlipala <adam@chlipala.net>
date Sun, 26 Dec 2010 15:11:23 -0500
parents b757dc2bd2f6
children 2d409aff8800
rev   line source
adam@1 1 fun discover r =
adam@2 2 dy <- Openid.discover r.Id;
adam@2 3 case dy of
adam@2 4 None => return <xml>No dice</xml>
adam@3 5 | Some dy =>
adam@3 6 os <- Openid.association dy.Endpoint;
adam@3 7 case os of
adam@3 8 Openid.Error s => error <xml>{[s]}</xml>
adam@3 9 | Openid.Handle s => return <xml>{[s]}</xml>
adam@1 10
adam@1 11 fun main () = return <xml><body>
adam@1 12 <form>
adam@1 13 <textbox{#Id}/>
adam@1 14 <submit action={discover}/>
adam@1 15 </form>
adam@1 16 </body></xml>