comparison src/monoize.sml @ 2255:8428c534913a

Use new refactored urlification in Sqlcache.
author Ziv Scully <ziv@mit.edu>
date Mon, 21 Sep 2015 16:45:59 -0400
parents 44ae2254f8fb
children 6f2ea4ed573a
comparison
equal deleted inserted replaced
2254:44ae2254f8fb 2255:8428c534913a
393 end) 393 end)
394 394
395 val attrifyExp = fooifyExp MonoFooify.Attr 395 val attrifyExp = fooifyExp MonoFooify.Attr
396 val urlifyExp = fooifyExp MonoFooify.Url 396 val urlifyExp = fooifyExp MonoFooify.Url
397 397
398 val urlifiedUnit =
399 let
400 val loc = ErrorMsg.dummySpan
401 (* Urlifies [ERel 0] to match the [sqlcacheInfo] field of [EQuery]s. *)
402 val (urlified, _) = urlifyExp CoreEnv.empty (Fm.empty 0)
403 ((L'.ERel 0, loc), (L'.TRecord [], loc))
404 in
405 urlified
406 end
407
408 datatype 'a failable_search = 398 datatype 'a failable_search =
409 Found of 'a 399 Found of 'a
410 | NotFound 400 | NotFound
411 | Error 401 | Error
412 402
1685 (L'.EApp ( 1675 (L'.EApp (
1686 (L'.EApp ((L'.ERel 4, loc), 1676 (L'.EApp ((L'.ERel 4, loc),
1687 (L'.ERel 1, loc)), loc), 1677 (L'.ERel 1, loc)), loc),
1688 (L'.ERel 0, loc)), loc), 1678 (L'.ERel 0, loc)), loc),
1689 (L'.ERecord [], loc)), loc) 1679 (L'.ERecord [], loc)), loc)
1690 val (urlifiedRel0, fm) = urlifyExp env fm ((L'.ERel 0, loc), state)
1691 val body = (L'.EQuery {exps = exps, 1680 val body = (L'.EQuery {exps = exps,
1692 tables = tables, 1681 tables = tables,
1693 state = state, 1682 state = state,
1694 query = (L'.ERel 3, loc), 1683 query = (L'.ERel 3, loc),
1695 body = body', 1684 body = body',
1696 initial = (L'.ERel 1, loc), 1685 initial = (L'.ERel 1, loc)},
1697 sqlcacheInfo = urlifiedRel0},
1698 loc) 1686 loc)
1699 in 1687 in
1700 ((L'.EAbs ("q", s, (L'.TFun (ft, (L'.TFun (state, (L'.TFun (un, state), loc)), loc)), loc), 1688 ((L'.EAbs ("q", s, (L'.TFun (ft, (L'.TFun (state, (L'.TFun (un, state), loc)), loc)), loc),
1701 (L'.EAbs ("f", ft, (L'.TFun (state, (L'.TFun (un, state), loc)), loc), 1689 (L'.EAbs ("f", ft, (L'.TFun (state, (L'.TFun (un, state), loc)), loc),
1702 (L'.EAbs ("i", state, (L'.TFun (un, state), loc), 1690 (L'.EAbs ("i", state, (L'.TFun (un, state), loc),