In this paper we present a general framework HM(X) for
Hindley/Milner style type systems with constraints, analogous
to the CLP(X) framework in constrained logic programming.
We present sufficient conditions on the constraint domain X
so that the principal types property carries over to HM(X).
The conditions turn out to be fairly simple and natural.
The usage of the aproach is demonstrated in instantion
of parameter X with several known type disciplines.
We consider extensible records, typeclasses, overloading
and subtyping