comparison src/urweb.grm @ 1191:61c3139eab12

Subquery expressions
author Adam Chlipala <adamc@hcoop.net>
date Thu, 25 Mar 2010 15:44:24 -0400
parents b8cfb05c091d
children 9c82548c97e9
comparison
equal deleted inserted replaced
1190:899875315bde 1191:61c3139eab12
1 (* Copyright (c) 2008-2009, Adam Chlipala 1 (* Copyright (c) 2008-2010, Adam Chlipala
2 * All rights reserved. 2 * All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met: 5 * modification, are permitted provided that the following conditions are met:
6 * 6 *
1766 val e = (EVar (["Basis"], "sql_ufunc", Infer), loc) 1766 val e = (EVar (["Basis"], "sql_ufunc", Infer), loc)
1767 val e = (EApp (e, fname), loc) 1767 val e = (EApp (e, fname), loc)
1768 in 1768 in
1769 (EApp (e, sqlexp), loc) 1769 (EApp (e, sqlexp), loc)
1770 end) 1770 end)
1771 | LPAREN query RPAREN (let
1772 val loc = s (LPARENleft, RPARENright)
1773
1774 val e = (EVar (["Basis"], "sql_subquery", Infer), loc)
1775 in
1776 (EApp (e, query), loc)
1777 end)
1771 1778
1772 fname : SYMBOL (EVar (["Basis"], "sql_" ^ SYMBOL, Infer), s (SYMBOLleft, SYMBOLright)) 1779 fname : SYMBOL (EVar (["Basis"], "sql_" ^ SYMBOL, Infer), s (SYMBOLleft, SYMBOLright))
1773 | LBRACE eexp RBRACE (eexp) 1780 | LBRACE eexp RBRACE (eexp)
1774 1781
1775 wopt : (sql_inject (EVar (["Basis"], "True", Infer), 1782 wopt : (sql_inject (EVar (["Basis"], "True", Infer),