[m-rev.] for review: don't allow nondefault mode functions in terms
Zoltan Somogyi
zoltan.somogyi at runbox.com
Mon Nov 2 14:08:45 AEDT 2015
On Mon, 02 Nov 2015 07:22:35 +1100 (AEDT), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> OK. I will post a proposed diff to the reference manual for review.
Here it is.
diff --git a/doc/reference_manual.texi b/doc/reference_manual.texi
index 77a8cb9..37dbe60 100644
--- a/doc/reference_manual.texi
+++ b/doc/reference_manual.texi
@@ -4500,6 +4500,15 @@ term that does not match this standard mode to somewhere where its higher-order
inst information may be lost, such as to a polymorphic predicate where the
argument mode is @code{in}.
+The Melbourne Mercury implementation currently cannot track
+all the places where higher-order inst information could be lost
+if a function is put into a term.
+To preserve safety, it therefore requires that
+functions may be put into terms only if they have the default signature,
+i.e. all their arguments have mode @code{in},
+their result has mode @code{out},
+and they have determinism @code{det}.
+
Mercury also provides builtin @samp{inst} values for use with solver types:
@example
I am committing the diff with this change to the manual.
Any review comments on the diff to the manual are best done
by editing the updated text.
Zoltan.
More information about the reviews
mailing list