Mercurial > urweb
comparison src/elaborate.sml @ 1736:7ec8dab190a7
Better discovery of type class instances from recursive definitions
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 02 May 2012 08:34:50 -0400 |
parents | ab24a7cb2a64 |
children | 78d7cc9c9b18 |
comparison
equal
deleted
inserted
replaced
1735:ec47f49c6aa3 | 1736:7ec8dab190a7 |
---|---|
3910 () | 3910 () |
3911 else | 3911 else |
3912 expError env (IllegalRec (x, e')); | 3912 expError env (IllegalRec (x, e')); |
3913 ((x, n, c', e'), gs1 @ gs) | 3913 ((x, n, c', e'), gs1 @ gs) |
3914 end) gs vis | 3914 end) gs vis |
3915 | |
3916 val vis = map (fn (x, n, t, e) => (x, n, normClassConstraint env t, e)) vis | |
3917 val d = (L'.DValRec vis, loc) | |
3915 in | 3918 in |
3916 ([(L'.DValRec vis, loc)], (env, denv, gs)) | 3919 ([d], (E.declBinds env d, denv, gs)) |
3917 end | 3920 end |
3918 | 3921 |
3919 | L.DSgn (x, sgn) => | 3922 | L.DSgn (x, sgn) => |
3920 let | 3923 let |
3921 val (sgn', gs') = elabSgn (env, denv) sgn | 3924 val (sgn', gs') = elabSgn (env, denv) sgn |