[m-rev.] for review: field names and higher order values in the debugger
Zoltan Somogyi
zs at cs.mu.OZ.AU
Wed Dec 19 15:17:17 AEDT 2001
On 19-Dec-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > Deconstruct closures as if they were ordinary terms, with the function
> > symbol being the name of the predicate/function and the arguments being
> > the terms stored in the closure.
>
> Allowing deconstruction of closures breaks referential transparency for
> std_util__deconstruct and the like.
Actually, deconstruction already breaks referential transparency for DU terms
with variable tags (for HAL), for c_pointers, typeinfos, typeclassinfos etc.
I would prefer to fix them all together.
> > +++ runtime/mercury_ml_expand_body.h 2001/12/18 03:33:42
> > @@ -549,8 +621,88 @@
> >
> > case MR_TYPECTOR_REP_PRED:
> > /* XXX expand_info->non_canonical_type = TRUE; */
>
> After your change, the code inside the comment there is needed.
I will uncomment that code when I add cc_multi versions of the deconstruction
predicates, probably next week. Before that, uncommenting would cause an abort
when trying to deconstruct closures.
> > +:- pragma foreign_proc("C#",
> > + named_argument(_Term::in, _ArgumentName::in) = (_ArgumentUniv::out),
> > + [will_not_call_mercury], "
> > +{
> > + mercury.runtime.Errors.SORRY(""foreign code for argument"");
> > + // XXX this is required to keep the C# compiler quiet
> > + SUCCESS_INDICATOR = false;
> > +}").
>
> It would be better to write that as Mercury code,
> like I did in private_builtin.m.
The rules for those were hashed out while I was concentrating on other things,
so I will do that change (not just for named_argument, but for all the other
similar predicates in that module) later.
I have followed your other suggestions.
Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list