view tests/active.ur @ 1989:210fb3dfc483

Some more nested functor bug-fixing, including generating fresh internal names at applications; still need to debug issues with datatype constructors
author Adam Chlipala <adam@chlipala.net>
date Thu, 20 Feb 2014 10:27:15 -0500
parents d794149b3713
children
line wrap: on
line source
fun counter' () =
    s <- source 0;
    return <xml>
      <dyn signal={n <- signal s; return (txt n)}/>
      <button onclick={fn _ => n <- get s; set s (n + 1)}/>
    </xml>

fun counter () = <xml><active code={counter' ()}/></xml>

fun main () : transaction page = return <xml><body>
  {counter ()}
  <hr/>
  {counter ()}
</body></xml>