Files
mercury/tests/hard_coded/intermod_c_code2.m
Peter Wang 75771a9b6e Allow testing of java grade. Requires using `mmc --make' for now.
Branches: main

Allow testing of java grade.  Requires using `mmc --make' for now.
This patch does not attempt to fix test failures.

tests/Mmake.common:
        Delete unneeded Java-specific rule, which was broken.

tests/benchmarks/Mmakefile:
tests/general/Mmakefile:
tests/general/string_format/Mmakefile:
tests/grade_subdirs/Mmakefile:
tests/hard_coded/Mmakefile:
tests/recompilation/Mmakefile:
tests/term/Mmakefile:
tests/valid/Mmakefile:
        Don't deliberately disable tests in java grade.

tests/*.m:
        Add Java foreign code.

        Write dummy procedures instead of abusing `:- external'.
2009-08-14 03:21:55 +00:00

36 lines
703 B
Mathematica

:- module intermod_c_code2.
:- interface.
:- some [U] pred c_code(T::in, U::out) is det.
:- implementation.
c_code(T, U) :- c_code_2(T, U).
:- some [U] pred c_code_2(T::in, U::out) is det.
:- pragma foreign_proc("C",
c_code_2(T::in, U::out),
[will_not_call_mercury, promise_pure],
"{
U = T;
TypeInfo_for_U = TypeInfo_for_T;
}").
:- pragma foreign_proc("C#", c_code_2(T::in, U::out), [promise_pure],
"{
U = T;
TypeInfo_for_U = TypeInfo_for_T;
}").
:- pragma foreign_proc("Java", c_code_2(T::in, U::out), [promise_pure],
"{
U = T;
TypeInfo_for_U = TypeInfo_for_T;
}").
:- pragma foreign_proc("Erlang", c_code_2(T::in, U::out), [promise_pure],
"
U = T,
TypeInfo_for_U = TypeInfo_for_T
").