:- module bug.
:- interface.
:- implementation.

:- import_module int.

:- type mytype ---> mytype.

:- pred add(mytype::unused, int::in, int::out) is det.
add(_, I, I+1).

:- pred call_int_modifier(pred(int,int)::in(pred(in, out) is det),
            int::in, int::out) is det.
call_int_modifier(Modifier, In, Out) :-
  Modifier(In, Out).

:- pred main(int::in, int::out) is det.
main(In, Out) :-
  call_int_modifier(add(_`with_type`mytype), In, Out).

:- pred main2(int::in, int::out) is det.
main2(In, Out) :-
  call_int_modifier(
    (pred(I::in, O::out) is det:- add(_`with_type`mytype, I, O)),
    In, Out).

