Decode this bug

Daniel Wang danwang@cs.princeton.edu
11 Dec 1999 12:19:18 -0500


"Stephen Weeks" <sweeks@intertrust.com> writes:

> I think I misinterpreted the trace here.  inferHandlers completed
> successfully.  The fold2 is probably an obscure (and that's being
> generous) error message produced by the type checker indicating the
> wrong number of arguments were passed to a constructor, passed to a
> function, or returned by a function.  The error message comes from the 
> call to foreach2 (which in turn calls fold2) from coerces in
> cps/analyze.fun.


Ahh that sounds more like.. it I'm definitely confused about the the
multi-args and multi-return interface for types and functions and their
interaction with tuples... 

Can you explain how the direct expect interface handles multiple return
values? Do I just return a tuple ala ML and expect it to work. Are detuple
and detupleBind there to handle multiple returns?

Can I just think of functions as always just returning and taking tuples?