:- module create_test_unification. :- interface. :- type fruit ---> apple ; banana ; cherry. :- inst ab == bound(apple ; banana). :- pred test_unification(fruit::in(I =< ab), int::out) is semidet. :- implementation. test_unification(X, Y) :- require_complete_switch [X] ( X = apple, Y = 42 ; X = banana, fail ).