Mercurial > urweb
comparison src/mono_opt.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 | e10881cd92da |
children |
comparison
equal
deleted
inserted
replaced
2254:44ae2254f8fb | 2255:8428c534913a |
---|---|
403 | 403 |
404 | EWrite (EQuery {exps, tables, state, query, | 404 | EWrite (EQuery {exps, tables, state, query, |
405 initial = (EPrim (Prim.String (k, "")), _), | 405 initial = (EPrim (Prim.String (k, "")), _), |
406 body = (EStrcat ((EPrim (Prim.String (_, s)), _), | 406 body = (EStrcat ((EPrim (Prim.String (_, s)), _), |
407 (EStrcat ((ERel 0, _), | 407 (EStrcat ((ERel 0, _), |
408 e'), _)), _), | 408 e'), _)), _)}, loc) => |
409 sqlcacheInfo}, loc) => | |
410 if (case k of Prim.Normal => s = "" | Prim.Html => CharVector.all Char.isSpace s) then | 409 if (case k of Prim.Normal => s = "" | Prim.Html => CharVector.all Char.isSpace s) then |
411 EQuery {exps = exps, tables = tables, query = query, | 410 EQuery {exps = exps, tables = tables, query = query, |
412 state = (TRecord [], loc), | 411 state = (TRecord [], loc), |
413 initial = (ERecord [], loc), | 412 initial = (ERecord [], loc), |
414 body = (optExp (EWrite e', loc), loc), | 413 body = (optExp (EWrite e', loc), loc)} |
415 sqlcacheInfo = Monoize.urlifiedUnit} | |
416 else | 414 else |
417 e | 415 e |
418 | 416 |
419 | EWrite (EQuery {exps, tables, state, query, | 417 | EWrite (EQuery {exps, tables, state, query, |
420 initial = (EPrim (Prim.String (_, "")), _), | 418 initial = (EPrim (Prim.String (_, "")), _), |
421 body, sqlcacheInfo}, loc) => | 419 body}, loc) => |
422 let | 420 let |
423 fun passLets (depth, (e', _), lets) = | 421 fun passLets (depth, (e', _), lets) = |
424 case e' of | 422 case e' of |
425 EStrcat ((ERel x, _), e'') => | 423 EStrcat ((ERel x, _), e'') => |
426 if x = depth then | 424 if x = depth then |
431 body lets | 429 body lets |
432 in | 430 in |
433 EQuery {exps = exps, tables = tables, query = query, | 431 EQuery {exps = exps, tables = tables, query = query, |
434 state = (TRecord [], loc), | 432 state = (TRecord [], loc), |
435 initial = (ERecord [], loc), | 433 initial = (ERecord [], loc), |
436 body = body, | 434 body = body} |
437 sqlcacheInfo = Monoize.urlifiedUnit} | |
438 end | 435 end |
439 else | 436 else |
440 e | 437 e |
441 | ELet (x, t, e', e'') => | 438 | ELet (x, t, e', e'') => |
442 passLets (depth + 1, e'', (x, t, e') :: lets) | 439 passLets (depth + 1, e'', (x, t, e') :: lets) |