[m-rev.] for review: comparison_result values in foreign code
Julien Fischer
juliensf at csse.unimelb.edu.au
Fri Dec 1 18:09:11 AEDT 2006
For review by anyone.
Estimated hours taken: 0.5
Branches: main
doc/reference_manual.texi:
Document how to manipulate values of the type
builtin.comparison_result in C foreign_proc or foreign_code
pragmas.
Julien.
Index: reference_manual.texi
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/doc/reference_manual.texi,v
retrieving revision 1.372
diff -u -r1.372 reference_manual.texi
--- reference_manual.texi 29 Oct 2006 03:18:52 -0000 1.372
+++ reference_manual.texi 1 Dec 2006 07:01:49 -0000
@@ -6506,6 +6506,12 @@
data constructors @samp{yes} and @samp{no}, as @code{MR_YES} and
@code{MR_NO} respectively.
+For the Mercury standard library type @samp{builtin.comparison_result}, there
+is a corresponding C type, @code{MR_Comparison_Result}. C code can refer
+to the data constructors of this type, @samp{(<)}, @samp{(=)} and @samp{(>)},
+as @code{MR_COMPARE_LESS}, @code{MR_COMPARE_EQUAL} and
+ at code{MR_COMPARE_GREATER} respectively.
+
Mercury variables of a type for which there is a C @samp{pragma foreign_type}
declaration (@pxref{Using foreign types from Mercury}) will be passed as
the corresponding C type.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list