comparison src/mono_reduce.sml @ 1214:648e6b087dfb

Change query_policy to sendClient; all arguments passed to SQL predicates are variables
author Adam Chlipala <adamc@hcoop.net>
date Thu, 08 Apr 2010 09:57:37 -0400
parents ae3036773768
children 950d1e540df6
comparison
equal deleted inserted replaced
1213:e791d93d4616 1214:648e6b087dfb
421 | EBinop (_, e1, e2) => summarize d e1 @ summarize d e2 421 | EBinop (_, e1, e2) => summarize d e1 @ summarize d e2
422 422
423 | ERecord xets => List.concat (map (summarize d o #2) xets) 423 | ERecord xets => List.concat (map (summarize d o #2) xets)
424 | EField (e, _) => summarize d e 424 | EField (e, _) => summarize d e
425 425
426 | ECase (e, pes, _) => summarize d e @ [Unsure] 426 | ECase (e, pes, _) =>
427 (*let 427 let
428 val lss = map (fn (p, e) => summarize (d + patBinds p) e) pes 428 val lss = map (fn (p, e) => summarize (d + patBinds p) e) pes
429 in 429 in
430 case lss of 430 case lss of
431 [] => raise Fail "Empty pattern match" 431 [] => raise Fail "Empty pattern match"
432 | ls :: lss => 432 | ls :: lss =>
433 if List.all (fn ls' => ls' = ls) lss then 433 summarize d e
434 summarize d e @ ls 434 @ (if List.all (fn ls' => ls' = ls) lss then
435 else 435 ls
436 [Unsure] 436 else if length (List.filter (not o List.null) (ls :: lss)) <= 1 then
437 end*) 437 valOf (List.find (not o List.null) (ls :: lss))
438 else
439 [Unsure])
440 end
438 | EStrcat (e1, e2) => summarize d e1 @ summarize d e2 441 | EStrcat (e1, e2) => summarize d e1 @ summarize d e2
439 442
440 | EError (e, _) => summarize d e @ [Unsure] 443 | EError (e, _) => summarize d e @ [Unsure]
441 | EReturnBlob {blob = e1, mimeType = e2, ...} => summarize d e1 @ summarize d e2 @ [Unsure] 444 | EReturnBlob {blob = e1, mimeType = e2, ...} => summarize d e1 @ summarize d e2 @ [Unsure]
442 | ERedirect (e, _) => summarize d e @ [Unsure] 445 | ERedirect (e, _) => summarize d e @ [Unsure]