This allows terms of type Key a to be coerced to type Key b when Coercible a b holds but prevents terms of type Size a and Angle a to be coerced to type Size b and Angle b. The reasoning being that keys of some type can be associated to to terms of types with the same representation but not arbitrary types and values with absolute or relative sizes and angles in degrees or radians don’t describe the same runtime values.
This allows terms of type
Key a
to be coerced to typeKey b
whenCoercible a b
holds but prevents terms of typeSize a
andAngle a
to be coerced to typeSize b
andAngle b
. The reasoning being that keys of some type can be associated to to terms of types with the same representation but not arbitrary types and values with absolute or relative sizes and angles in degrees or radians don’t describe the same runtime values.