view demo/listShop.ur @ 1886:b7cd3c7c7edd

Interpret 'table' signature items more flexibly, automatically adding (Ur) constraints to support a kind of subtyping over (SQL) constraint sets
author Adam Chlipala <adam@chlipala.net>
date Mon, 04 Nov 2013 15:14:23 -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>