Mercurial > urweb
annotate tests/timestamp.ur @ 2126:ec1614fb97bb
Change MonoReduce to do fixed-pointing, since it sometimes enables more optimizations for itself (e.g., yanking lambdas out of [case]s)
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 06 Mar 2015 09:46:21 -0500 |
parents | 690638bd9fef |
children |
rev | line source |
---|---|
adam@1834 | 1 table t : { A : time } |
adam@1834 | 2 |
adam@1834 | 3 fun many ls = |
adam@1834 | 4 case ls of |
adam@1834 | 5 [] => (WHERE TRUE) |
adam@1834 | 6 | tm :: ls' => (WHERE t.A = {[tm]} AND {many ls'}) |
adam@1834 | 7 |
adam@1834 | 8 task initialize = fn () => |
adam@1834 | 9 tm <- now; |
adam@1834 | 10 dml (DELETE FROM t WHERE {many (tm :: [])}) |
adam@1834 | 11 |