summaryrefslogtreecommitdiff
path: root/src/urweb.grm
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-31 15:15:41 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-31 15:15:41 -0400
commit6a144b5f5a7e85a02465aa25a19c3b5686e062cb (patch)
tree9b8ec9f45e09d619e326c40706e38599a4ed9851 /src/urweb.grm
parent0ca7aad45b1581ab86d136aaf7829418e093bb24 (diff)
'eq' type class
Diffstat (limited to 'src/urweb.grm')
-rw-r--r--src/urweb.grm10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/urweb.grm b/src/urweb.grm
index aa062516..9d619fca 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -141,6 +141,15 @@ fun sql_relop (oper, sqlexp1, sqlexp2, loc) =
(EApp (e, sqlexp2), loc)
end
+fun native_op (oper, e1, e2, loc) =
+ let
+ val e = (EVar (["Basis"], oper), loc)
+ val e = (EApp (e, (EWild, loc)), loc)
+ val e = (EApp (e, e1), loc)
+ in
+ (EApp (e, e2), loc)
+ end
+
%%
%header (functor UrwebLrValsFn(structure Token : TOKEN))
@@ -595,6 +604,7 @@ eexp : eapps (eapps)
in
(EApp (e, (EAbs (SYMBOL, NONE, eexp2), loc)), loc)
end)
+ | eexp EQ eexp (native_op ("eq", eexp1, eexp2, s (eexp1left, eexp2right)))
eargs : earg (earg)
| eargl (eargl)