view tests/view.ur @ 1836:276fa06428ba

Ignore polymorphism in JavaScript calls to custom FFI functions, allowing a kind of simple dynamic typing (unsafe, of course)
author Adam Chlipala <adam@chlipala.net>
date Tue, 11 Dec 2012 15:58:23 -0500
parents 8688e01ae469
children
line wrap: on
line source
table t : { A : int, B : string }

view v = SELECT t.A AS X FROM t

fun main () =
    rows <- queryX (SELECT * FROM v)
            (fn r => <xml><li>{[r.V.X]}</li></xml>);
    return <xml><body>
      {rows}
    </body></xml>