mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-15 22:03:26 +00:00
Estimated hours taken: 2 Branches: main Fix spurious errors in the test cases so that they pass in the grade il. tests/valid/big_foreign_type.m: Add C# implementations of the foreign types. tests/valid/int64.m: tests/valid/liveness_nonlocals.m: tests/valid/subtype_switch.m: tests/valid/tabled_for_io.m: tests/valid/two_pragma_c_codes.m: tests/valid/zero_arity.m: Provide default implementations of C pragma foreign_code. tests/valid/intermod_impure2.m: Provide an il implementation of C pragma foreign_code. tests/valid/spurious_purity_warning.m: Fix some determinism warnings. tests/valid/typeclass_inlining_bug.m: Remove an unneeded abstract type.
21 lines
396 B
Mathematica
21 lines
396 B
Mathematica
% A test for the case where we have pragma(c_code, ...) decs for different
|
|
% modes of the same pred.
|
|
|
|
:- module tabled_for_io.
|
|
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred test(int::in, int::out, io__state::di, io__state::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
:- pragma c_code(test(A::in, B::out, IO0::di, IO::uo),
|
|
[will_not_call_mercury, tabled_for_io],
|
|
"
|
|
B = A;
|
|
IO = IO0;
|
|
").
|
|
test(X, X) --> [].
|