[m-rev.] for review: don't allow nondefault mode functions in terms
Zoltan Somogyi
zoltan.somogyi at runbox.com
Fri Oct 30 16:55:47 AEDT 2015
On Fri, 30 Oct 2015 14:52:38 +1100, Mark Brown <mark at mercurylang.org> wrote:
> On Fri, Oct 30, 2015 at 1:58 PM, Zoltan Somogyi
> <zoltan.somogyi at runbox.com> wrote:
> > The language reference manual already disallows putting functions with
> > nondefault mode and determinism signatures into terms (in section 8.3)
>
> Did you mean to say *ground* terms? They are not generally disallowed in terms.
I don't really understand your question. Do you mean "ground" as in
"contains no variables" or "ground" as "Inst = ground(shared, none)",
i.e. no further information about its binding. If the former, the presence of
variables elsewhere in the term should not matter. If the latter, I don't know
how that could affect the decision made by the newly added code.
> > We allowed it so far, and even used such code ourselves, even though
> > it could lead to crashes. So this diff, which disallows such code, would
> > de facto, though not de jure, change the language. Any objections to that?
>
> For the changes in the browser directory, is it not possible to always
> keep the directory list in simplified form and accurately reflect that
> in the inst? That would be preferable to dynamic checking.
You are almost certainly right. I was just going for a minimum change
with this diff, and intended to come back to it later, reflecting the simplified
form of the dir list in the *type*. We don't want to put that info into insts
as long as we want to put such functions into terms.
Zoltan.
More information about the reviews
mailing list