Files
mercury/tests/valid/assoc_list_bug.m
Julien Fischer 47cbf625bf Fix bitrot in tests we don't run.
tests/hard_coded/export_test2.m:
tests/invalid/foreign_type_line_number.m:
tests/valid/assoc_list_bug.m:
tests/valid/determinism.m:
tests/valid/mode_merge_insts.m
tests/valid/unify_inst_bug.m:
    As above, mainly replacing bits of syntax that are no longer
    supported.

tests/hard_coded/Mmakefile:
    Delete references to the IL backend.
2016-01-02 00:58:59 +11:00

20 lines
594 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module assoc_list_bug.
:- interface.
:- import_module list.
:- import_module pair.
:- pred assoc_list_member(pair(K, V), list(pair(K, V))).
:- mode assoc_list_member(bound(free - ground) >> ground, in) is semidet.
:- mode assoc_list_member(bound(free - free) >> ground, in) is nondet.
:- implementation.
assoc_list_member(X, [X | _]).
assoc_list_member(X, [_ | Xs]) :-
assoc_list_member(X, Xs).