[m-users.] documentation for foreign_export_enum
Matthias Güdemann
matthias at guedemann.org
Fri May 22 21:33:21 AEST 2015
Hi,
in section 14.5 of the language reference, it is stated that for
> :- pragma foreign_export_enum("Lang", MercuryType, Attributes, Overrides).
"The argument Attributes is a list of optional attributes. If empty,
it may be omitted from the ‘pragma foreign_export_enum’ declaration."
But when I omit the Attributes list in mmc 14.01.1, I get the following
error:
> Error: malformed attributes list in `:- pragma foreign_export_enum' declaration.
for
,----
| :- pragma foreign_export_enum("C", comparison_result/0,
| [
| (<) - "MR_GMP_LT",
| (=) - "MR_GMP_EQ",
| (>) - "MR_GMP_GT"
| ]).
`----
while this works:
,----
| :- pragma foreign_export_enum("C", comparison_result/0, [],
| [
| (<) - "MR_GMP_LT",
| (=) - "MR_GMP_EQ",
| (>) - "MR_GMP_GT"
| ]).
`----
Matthias
More information about the users
mailing list