:- module nonempty12. :- interface. :- import_module list. :- type hold(T) ---> hold(T). :- func extract(hold(list(int))) = list(int). :- mode extract(in) = out(non_empty_list) is det. :- implementation. extract(hold(X)) = X.