Skip to content

Fix accidental unsoundness in Data.Typeable.Internal.mkTypeLitFromString

Ryan Scott requested to merge wip/T19288 into master

An accidental use of tcSymbol instead of tcNat in the TypeLitNat case of mkTypeLitFromString meant that it was possible to unsafely equate Nat with Symbol. A consequence of this is that you could write unsafeCoerce, as observed in #19288 (closed). This is fixed easily enough, thankfully.

Fixes #19288 (closed).

Merge request reports