Confident patterns: define conversions to user-defined types