pub fn canon_refinement(r: Option<&Refinement>) -> StringExpand description
Predicates canonicalise as a sorted set.
This is not a nicety adjacent to the hash; it is a precondition for it.
Predicates are conjunctive and side-effect-free, so String where NonEmpty, MaxLen(10) and String where MaxLen(10), NonEmpty are the same type — and
hashing them in source order would make two contexts that agree perfectly
fail closed against each other. The same normal form also backs the checker’s
refinements_match, so the matcher and the hash cannot disagree about what
“the same refinement” means.