Mercurial > urweb
diff src/urweb.grm @ 256:e52243e20858
'eq' type class
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 31 Aug 2008 15:15:41 -0400 |
parents | 71bafe66dbe1 |
children | 32f9212583b2 |
line wrap: on
line diff
--- a/src/urweb.grm Sun Aug 31 15:04:10 2008 -0400 +++ b/src/urweb.grm Sun Aug 31 15:15:41 2008 -0400 @@ -141,6 +141,15 @@ (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 @@ 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)