:- module testbug.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.

:- import_module list, int.

main(!IO) :-
   A = [1,2,3],
   B = [1,2,3],
   (
   if A = B
   % if same(A, B)  % use this to compile seamlessly
   then io.write_string("yes\n", !IO)
   else io.write_string("no\n", !IO)
   ).

:- pred same(T::in, T::in) is semidet.
same(A, B) :- A = B.
