Skip to content

Add role annotations to SNat, SSymbol and SChar

Matthew Pickering requested to merge wip/t23454 into master

Add role annotations to SNat, SSymbol and SChar

Ticket #23454 (closed) explained it was possible to implement unsafeCoerce because SNat was lacking a role annotation.

As these are supposed to be singleton types but backed by an efficient representation the correct annotation is nominal to ensure these kinds of coerces are forbidden.

These annotations were missed from https://github.com/haskell/core-libraries-committee/issues/85 which was implemented in 532de368.

Fixes #23454 (closed)

Merge request reports