Mercurial > urweb
diff src/elab_util.sml @ 213:0343557355fc
Explifying type classes
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 16 Aug 2008 14:45:23 -0400 |
parents | e86411f647c6 |
children | 19e5791923d0 |
line wrap: on
line diff
--- a/src/elab_util.sml Sat Aug 16 14:36:17 2008 -0400 +++ b/src/elab_util.sml Sat Aug 16 14:45:23 2008 -0400 @@ -634,7 +634,9 @@ | DExport _ => ctx | DTable (tn, x, n, c) => bind (ctx, NamedE (x, (CApp ((CModProj (n, [], "table"), loc), - c), loc))), + c), loc))) + | DClass (x, _, _) => + bind (ctx, NamedC (x, (KArrow ((KType, loc), (KType, loc)), loc))), mfd ctx d)) ctx ds, fn ds' => (StrConst ds', loc)) | StrVar _ => S.return2 strAll @@ -727,6 +729,11 @@ fn c' => (DTable (tn, x, n, c'), loc)) + | DClass (x, n, c) => + S.map2 (mfc ctx c, + fn c' => + (DClass (x, n, c'), loc)) + and mfvi ctx (x, n, c, e) = S.bind2 (mfc ctx c, fn c' =>