Working with parameterised derived type containing array of parameterised derived type

Has anybody in this Forum ever attempted using pdts for generic programming? is something like this allowed:

type :: generic_sorter
   integer, kind :: rkind
   contains
      procedure :: sort
end type generic_sorter
contains
subroutine sort(self,array)
   class(generic_sorter), intent(in) :: self
   real(self%rkind), intent(inout) :: array(:)
end subroutine sort

If that is the case, entire libraries could be wrapped this way!