diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-08-16 14:45:23 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-08-16 14:45:23 -0400 |
commit | e9456cb231725d65a9cdd11dc3d4549fe7254e06 (patch) | |
tree | d2582b97f013e5759f2c0aa3f9bc030b74e92991 /src/elab_util.sml | |
parent | 70cd2b655dd741ad04a98dbe6685ec2ec9e11fdd (diff) |
Explifying type classes
Diffstat (limited to 'src/elab_util.sml')
-rw-r--r-- | src/elab_util.sml | 9 |
1 files changed, 8 insertions, 1 deletions
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' => |