From e9456cb231725d65a9cdd11dc3d4549fe7254e06 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 16 Aug 2008 14:45:23 -0400 Subject: Explifying type classes --- src/elab_util.sml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/elab_util.sml') diff --git a/src/elab_util.sml b/src/elab_util.sml index c3ed2d19..1c2ce4bd 100644 --- a/src/elab_util.sml +++ b/src/elab_util.sml @@ -634,7 +634,9 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, sgn_item = fsgi, sgn = fsg, str = f | 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 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, sgn_item = fsgi, sgn = fsg, str = f 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' => -- cgit v1.2.3