Mercurial > urweb
view tests/unurlify.ur @ 2130:e8863d9f8c59
New mouse events oncontextmenu, onmouseenter, and onmouseleave.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Tue, 07 Apr 2015 14:18:53 -0400 |
parents | ebf27030ae3b |
children |
line wrap: on
line source
datatype list t = Nil | Cons of t * list t fun handler (ls : list bool) = return <xml/> datatype wlist = WNil | Empty | WCons of bool * wlist fun whandler' (ls : wlist) = case ls of WNil => <xml>Nil</xml> | Empty => <xml>Empty</xml> | WCons (x, ls') => <xml>{[x]} :: {whandler' ls'}</xml> fun whandler ls = return (whandler' ls) fun main () : transaction page = return <xml><body> <a link={handler Nil}>!</a><br/> <a link={whandler WNil}>Nil</a><br/> <a link={whandler Empty}>Empty</a><br/> <a link={whandler (WCons (True, WCons (False, Empty)))}>True :: False :: Empty</a><br/> </body></xml>