Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
255:69d337f186eb | 256:e52243e20858 |
---|---|
139 val e = (EApp (e, sqlexp1), loc) | 139 val e = (EApp (e, sqlexp1), loc) |
140 in | 140 in |
141 (EApp (e, sqlexp2), loc) | 141 (EApp (e, sqlexp2), loc) |
142 end | 142 end |
143 | 143 |
144 fun native_op (oper, e1, e2, loc) = | |
145 let | |
146 val e = (EVar (["Basis"], oper), loc) | |
147 val e = (EApp (e, (EWild, loc)), loc) | |
148 val e = (EApp (e, e1), loc) | |
149 in | |
150 (EApp (e, e2), loc) | |
151 end | |
152 | |
144 %% | 153 %% |
145 %header (functor UrwebLrValsFn(structure Token : TOKEN)) | 154 %header (functor UrwebLrValsFn(structure Token : TOKEN)) |
146 | 155 |
147 %term | 156 %term |
148 EOF | 157 EOF |
593 val e = (EVar (["Basis"], "bind"), loc) | 602 val e = (EVar (["Basis"], "bind"), loc) |
594 val e = (EApp (e, eexp1), loc) | 603 val e = (EApp (e, eexp1), loc) |
595 in | 604 in |
596 (EApp (e, (EAbs (SYMBOL, NONE, eexp2), loc)), loc) | 605 (EApp (e, (EAbs (SYMBOL, NONE, eexp2), loc)), loc) |
597 end) | 606 end) |
607 | eexp EQ eexp (native_op ("eq", eexp1, eexp2, s (eexp1left, eexp2right))) | |
598 | 608 |
599 eargs : earg (earg) | 609 eargs : earg (earg) |
600 | eargl (eargl) | 610 | eargl (eargl) |
601 | 611 |
602 eargl : eargp eargp (eargp1 o eargp2) | 612 eargl : eargp eargp (eargp1 o eargp2) |