[m-rev.] for review: Add combined higher-order types and insts to NEWS.

Peter Wang novalazy at gmail.com
Tue Feb 11 11:45:20 AEDT 2020


NEWS:
    Add combined higher-order types and insts as new to the 20.01
    release.

diff --git a/NEWS b/NEWS
index 3a4fd1f82..6bdc5e67e 100644
--- a/NEWS
+++ b/NEWS
@@ -376,6 +376,17 @@ Changes to the Mercury language
 * Digits in numeric literals may now be separated by underscores in order
   to improve readability.
 
+* We now allow combined higher-order types and insts as direct arguments of
+  functors in discriminated unions, as in the following type:
+
+        :- type job
+            --->    job(pred(int::out, io::di, io::uo) is det).
+
+  For any construction unification using this functor the argument must have
+  the required higher-order inst; it is a mode error if it does not. When
+  terms of type `job` with inst `ground` are deconstructed, the argument is
+  inferred to have the given inst, allowing a higher-order call in that mode.
+
 Changes to the Mercury standard library
 ---------------------------------------
 
-- 
2.25.0



More information about the reviews mailing list