Files
mercury/tests/general/dnf.m
Tyson Dowd 630c98c8f1 Remove support for term_to_type and type_to_term implemented as special
Estimated hours taken: 5

Remove support for term_to_type and type_to_term implemented as special
preds.  Remove support for one-cell and one-or-two-cell type_infos (now
shared-one-or-two-cell type_infos). Move definitions that were in
mercury_builtin.m back to where they belong.

This code has been removed because it is no longer used, and was no
longer being maintained but was still quite complex.

tests/general/disj_disj.m:
tests/general/dnf.m:
tests/general/higher_order.m:
tests/general/nondet_disj.m:
tests/hard_coded/cc_nondet_disj.m:
tests/hard_coded/pragma_inline.m:
tests/invalid/funcs_as_preds.err_exp:
tests/misc_tests/mdemangle_test.exp:
tests/valid/agc_unbound_typevars.m:
tests/valid/middle_rec_labels.m:
tests/valid/subtype_switch.m:
tests/warnings/infinite_recursion.m:
	Import module `list' or `term' (or both).
1997-05-20 02:09:15 +00:00

38 lines
784 B
Mathematica

% This tests whether the program as transformed by dnf still works.
% It does not (cannot) test whether dnf is applied, of course.
:- module dnf.
:- interface.
:- import_module io.
:- pred main(io__state::di, io__state::uo) is det.
:- implementation.
:- import_module std_util, list.
main -->
{ solutions(lambda([Pair::out] is multi,
(Pair = X-Y, q(X, Y))), List) },
print_list(List).
:- pred print_list(list(pair(int))::in, io__state::di, io__state::uo) is det.
print_list([]) --> [].
print_list([X-Y|Rest]) -->
io__write_string("X = "),
io__write_int(X),
io__write_string(", Y = "),
io__write_int(Y),
io__write_string("\n"),
print_list(Rest).
:- pred q(int::out, int::out) is multidet.
:- pragma(memo, q/2).
q(X, Y) :-
( X = 1 ; X = 2 ),
( Y = 41 ; Y = 42 ).