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

Paul Bone paul at bone.id.au
Thu Sep 8 12:02:49 AEST 2016


On Thu, Sep 08, 2016 at 11:53:31AM +1000, Julien Fischer wrote:
> 
> 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
> 

Perhaps the title shouldn't imply the existence of foreign_export_enum for
Erlang.  Maybe something like "Using Mercury enums in Erlang".

Cheers.

-- 
Paul Bone
http://paul.bone.id.au


More information about the reviews mailing list