Slight modification of Thomas' last fix in order to keep the annotated constraints first in the inferred type