mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-18 23:35:25 +00:00
Estimated hours taken: 3 Branches: main Get the tests in hard_coded to compile in the grade il. The tests may still fail because of other reasons. tests/hard_coded/constraint_order.m: tests/hard_coded/copy_pred.m: tests/hard_coded/copy_pred_2.m: tests/hard_coded/dupcall_impurity.m: tests/hard_coded/export_test.m: tests/hard_coded/foreign_import_module.m: tests/hard_coded/foreign_type3.m: tests/hard_coded/ho_solns.m: tests/hard_coded/ho_univ_to_type.m: tests/hard_coded/impure_foreign.m: tests/hard_coded/impure_prune.m: tests/hard_coded/intermod_c_code2.m: tests/hard_coded/intermod_multimode.m: tests/hard_coded/multimode.m: tests/hard_coded/no_inline.m: tests/hard_coded/rnd.m: Provide C# implementation of C code. tests/hard_coded/existential_types_test.m: tests/hard_coded/frameopt_pragma_redirect.m: tests/hard_coded/mode_choice.m: tests/hard_coded/pragma_c_code.m: tests/hard_coded/pragma_inline.m: tests/hard_coded/target_mlobjs.m: tests/hard_coded/unused_float_box_test.m: Provide Mercury implementation of C code. tests/hard_coded/redoip_clobber.m: Provide MC++ implementation of C code.
24 lines
408 B
Mathematica
24 lines
408 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 c_code(c_code_2(T::in, U::out),
|
|
"{
|
|
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;
|
|
}").
|
|
|