:- module unchanged_with_type_nr_2.

:- interface.

:- import_module list.

:- type map_pred(T, U) == pred(T, U).
:- inst map_pred == (pred(in, out) is det).

:- pred with_type_1(T, list(_)) `with_type` map_pred(string, string).
:- mode with_type_1(in, in) `with_inst` map_pred.
:- pragma type_spec(with_type_1/4, T = list(_)).

:- type map_func(T, U) == (func(T) = U).
:- inst map_func == (func(in) = out is det).

:- func with_type_2(T, list(_)) `with_type` map_func(string, string).
:- mode with_type_2(in, in) `with_inst` map_func.

:- pred with_type_3(T::in, list(_)::in) `with_type` map_pred(string, string)
				`with_inst` map_pred.

:- pred with_type_4 `with_type` map_pred(T, T) `with_inst` map_pred.

:- func with_type_5 `with_type` map_func(T, T) `with_inst` map_func.

:- func with_type_6 `with_type` map_func(T, T) is det <= string(T).

:- typeclass string(T) where [].
:- instance string(string).

:- type t == int.

:- implementation.

:- instance string(string) where [].

with_type_1(_, _, X, X).

with_type_2(_, _, X) = X.

with_type_3(_, _, X, X).

with_type_4(X, X).

with_type_5(X) = X.

with_type_6(X) = X.
