Since veneers can behave confusingly in dynamic-mode contexts, disallow their use as an expression or annotation in a dynamic-mode context. The intent is to avoid especially confusing behavior like a true result from
("a" :: StringCI) > "A"
where static mode would error due to inconsistent comparable implementations for the arguments to >, but dynamic mode would just dispatch to a dynamic (not case-sensitive) string comparison.
This change does not avoid all possible confusions with veneers. For example, a function declared in a static context can declare a veneer result annotation, and then the function can still be called in a dynamic context. The change hopefully avoids most potential confusion, though.
Since veneers can behave confusingly in dynamic-mode contexts, disallow their use as an expression or annotation in a dynamic-mode context. The intent is to avoid especially confusing behavior like a true result from
("a" :: StringCI) > "A"
where static mode would error due to inconsistent comparable implementations for the arguments to
>
, but dynamic mode would just dispatch to a dynamic (not case-sensitive) string comparison.This change does not avoid all possible confusions with veneers. For example, a function declared in a static context can declare a veneer result annotation, and then the function can still be called in a dynamic context. The change hopefully avoids most potential confusion, though.