mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 19:03:45 +00:00
Estimated hours taken: 0.5 compiler/lambda.m: Fix a bug in the computation of the modes of introduced predicates. tests/valid/lambda_output.m: Test case.
32 lines
562 B
Mathematica
32 lines
562 B
Mathematica
:- module lambda_output.
|
|
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io__state::di, io__state::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
main -->
|
|
fork(a(_), b).
|
|
|
|
:- pred fork(pred(io__state, io__state), pred(io__state, io__state),
|
|
io__state, io__state).
|
|
:- mode fork(pred(di, uo) is det, pred(di, uo) is det,
|
|
di, uo) is det.
|
|
|
|
fork(A, B) -->
|
|
call(A), call(B).
|
|
|
|
:- pred a(int, io__state, io__state).
|
|
:- mode a(out, di, uo) is det.
|
|
|
|
a(42) --> [].
|
|
|
|
:- pred b(io__state, io__state).
|
|
:- mode b(di, uo) is det.
|
|
|
|
b --> [].
|
|
|