§4.5.(d) Typing rules

A parameter mapping (implicit by parameter position or explicit by a with clause) is well typed if the right hand side conforms to the left hand side, either by

A result mapping (implicit or explicit by a with clause) is well typed, if the value at the left hand conforms to the right hand side according to the rules given above, except that translation polymorphism here applies lowering instead of lifting.

These rules define translation polymorphism as introduced in §2.3.

Additionally, in a replace callin binding compatibility of parameters and return types must hold in both directions. Thus, from the above list of conversions a replace binding cannot apply subtype polymorphism nor primitive type conversion. If more flexibility is desired, type parameters can be used as defined in §4.10.