mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 02:43:40 +00:00
tests/invalid/bug10.{m,err_exp}:
tests/invalid/bug115.{m,err_exp}:
tests/invalid/bug117.{m,err_exp}:
tests/invalid/bug191.{m,err_exp}:
tests/invalid/bug436.{m,err_exp}:
tests/invalid/invalid_binary_literal.{m,err_exp}:
tests/invalid/invalid_decimal_literal.{m,err_exp}:
tests/invalid/invalid_float_literal.{m,err_exp}:
tests/invalid/invalid_hex_literal.{m,err_exp}:
tests/invalid/invalid_octal_literal.{m,err_exp}:
tests/invalid/invalid_pragma.{m,err_exp}:
tests/invalid/require_tailrec_invalid.{m,err_exp}:
tests/invalid/type_lhs_var.{m,err_exp}:
tests/invalid/typeclass_no_param.{m,err_exp}:
tests/invalid/unrecognized_pragma.{m,err_exp}:
Put vim modelines into these .m files, and improve their
programming style.
Update the .err_exp files for the changed line numbers.
35 lines
771 B
Mathematica
35 lines
771 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% Check that all of the symbols in the third argument of a foreign_enum pragma
|
|
% are data constructors of the type referred to by the foreign_enum pragma.
|
|
%
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- module bug436.
|
|
:- interface.
|
|
|
|
:- type foo
|
|
---> foo1
|
|
; foo2.
|
|
|
|
:- type bar
|
|
---> bar1
|
|
; bar2.
|
|
|
|
:- implementation.
|
|
|
|
:- pragma foreign_enum("C", foo/0, [
|
|
foo1 - "1",
|
|
foo2 - "2",
|
|
bar - "3"
|
|
]).
|
|
|
|
:- pragma foreign_enum("C", bar/0, [
|
|
bar1 - "1",
|
|
bar2 - "2",
|
|
baaz1 - "3",
|
|
baaz2 - "4"
|
|
]).
|