made 'datatype_new_compat' work with sort constraints
made 'datatype_new_compat' work with sort constraints

MerelyAPseudonym/isabelle,MerelyAPseudonym/isabelle,MerelyAPseudonym/isabelle,MerelyAPseudonym/isabelle,MerelyAPseudonym/isabelle,MerelyAPseudonym/isabelle