[m-rev.] for review: document ':- pragma foreign_export_enum' for Erlang.

Julien Fischer jfischer at opturion.com
Thu Sep 8 11:53:31 AEST 2016


For review by anyone.

--------------------

Document ':- pragma foreign_export_enum' for Erlang.

doc/reference_manual.texi:
      Describe why the above pragma is not support for Erlang.

Julien.

diff --git a/doc/reference_manual.texi b/doc/reference_manual.texi
index 51a1422..8f5a639 100644
--- a/doc/reference_manual.texi
+++ b/doc/reference_manual.texi
@@ -8675,13 +8675,14 @@ For example:

  @menu
  * Using pragma foreign_type for Erlang :: Declaring Erlang types in Mercury
+* Using pragma foreign_export_enum for Erlang :: Using Mercury enumerations in
+                                               Erlang
  * Using pragma foreign_proc for Erlang :: Calling Erlang code from Mercury
  * Using pragma foreign_export for Erlang :: Calling Mercury from Erlang code
  * Using pragma foreign_decl for Erlang :: Including Erlang declarations in Mercury
  * Using pragma foreign_code for Erlang :: Including Erlang code in Mercury
  @end menu

-
  @node Using pragma foreign_type for Erlang
  @subsubsection Using pragma foreign_type for Erlang

@@ -8695,6 +8696,15 @@ The effect of this declaration is that Mercury values of type
  @var{MercuryTypeName} will be passed to and from Erlang foreign_procs
  as having some representation unknown to Mercury.

+ at node Using pragma foreign_export_enum for Erlang
+ at subsubsection Using pragma foreign_export_enum for Erlang
+
+Values of Mercury enumeration types may be referred to from Erlang code using
+the convention for discriminated union types described in
+ at ref{Erlang data passing conventions}.
+As such, @samp{pragma foreign_export_enum} declarations are neither required or
+supported for Erlang.
+
  @node Using pragma foreign_proc for Erlang
  @subsubsection Using pragma foreign_proc for Erlang



More information about the reviews mailing list