[m-dev.] diff: typeclasses (round 2) [2/4]

David Glen JEFFERY dgj at cs.mu.oz.au
Fri Dec 19 11:53:32 AEDT 1997


> On 18-Dec-1997, David Glen JEFFERY <dgj at cs.mu.oz.au> wrote:
> > --- compiler/lambda.m	Thu Dec 18 15:53:45 1997
> > +++ /home/pgrad/dgj/mer/work/mercury/compiler/lambda.m	Tue Dec  2 16:43:17 1997
> > @@ -28,6 +28,11 @@
> >  %
> >  %	:- pred '__LambdaGoal__1'(int::in, int::out) is nondet.
> >  %	'__LambdaGoal__1'(X, Y) :- q(Y, X).
> > +%
> > +%
> > +%
> > +%	Note: Support for lambda expressions which involve class constraints
> > +%	      is not yet complete.
> 
> What still needs to be done?

Well... it basically needs some testing.  (Then probably some debugging. :-( )

> Is the paper really called "Type class: ...",
> not "Type classes: ..."?
> 
> > +:- type cons_type_info 
> > +	---> cons_type_info(
> > +			tvarset, 
> > +			type, 
> > +			list(type), 
> > +			list(class_constraint)
> > +		).
> 
> Some comments here would be helpful.

Hey, that's not fair! I only added one line. Okay... I'll add comments to your
uncommented code. ;-)

> > -		% XXX Can we really ignore _NewTypeNames?
> > -	varset__merge_subst(TypeNames, ClassVarset, _NewTypeNames, RenameSubst),
> > +		% XXX Can we really ignore _NewTVarSet?
> > +	varset__merge_subst(TVarSet, ClassVarset, NewTVarSet, RenameSubst),
> 
> I'm still a bit worried by this XXX.

Oops. Bug in the comment. If you look closely, we no longer ignore the tvarset.
I've deleted the comment.

> So, it looks like this stuff is just about ready to be committed.
> There are still some important things outstanding, namely
> 
> 	- documentation

Yeah... this is quite urgent, and I haven't really started.

> 	- test cases

Should be ready RSN. I have a lot of test cases... I just need to package them
nicely.

> 	- specialization of class method calls if the type is known

RSN. After I've addressed the others, though.

> 	- support for type inference

This is fairly simple. I guess I'll do this after the user documentation.


> but I think that even though all of these are pretty crucial it is
> probably worth committing now so that the rest of us can give it a
> bit of a shake-out while you work on those.

Woo hoo! Let the bug reports come on in!

> Please post a final diff (with respect to the current CVS main branch)
> when you commit.

Will do.


love and cuddles,
dgj
-- 
David Jeffery (dgj at cs.mu.oz.au) |  Marge: Did you just call everyone "chicken"?
MEngSc student,                 |  Homer: Noooo.  I swear on this Bible!
Department of Computer Science  |  Marge: That's not a Bible; that's a book of
University of Melbourne         |         carpet samples!
Australia                       |  Homer: Ooooh... Fuzzy.



More information about the developers mailing list