Refinement Types are a language feature.
A type endowed with a predicate which is assumed to hold for any element of the refined type.
Languages with Refinement Types include Raku
subset Color of Any where Color | CMYK_Color;
Article source