view demo/listShop.ur @ 2082:1b76ae703cbb

Some more optimization of string expressions showing up in JSON generation (Meta library)
author Adam Chlipala <adam@chlipala.net>
date Wed, 03 Dec 2014 21:06:15 -0500
parents 8084fa9216de
children
line wrap: on
line source
structure I = struct
    type t = int
    val toString = show
    val fromString = read
end

structure S = struct
    type t = string
    val toString = show
    val fromString = read
end

structure IL = ListFun.Make(I)
structure SL = ListFun.Make(S)

fun main () = return <xml><body>
  Pick your poison:<br/>
  <li> <a link={IL.main ()}>Integers</a></li>
  <li> <a link={SL.main ()}>Strings</a></li>
</body></xml>