Type roles in GHCi
|Reported by:||monoidal||Owned by:||goldfire|
|Type of failure:||None/Unknown||Difficulty:||Unknown|
|Test Case:||ghci/scripts/T8485||Blocked By:|
λ> data A a; type role A nominal λ> :i A type role A nominal data A a
λ> data A a λ> type role A nominal λ> :i A type role A phantom data A a
Accepting role annotations after the definition probably leads to problems when intermediate definitions relied on the earlier role; so I think the second situation should give an error. In fact, in the second snippet GHC does not even require -XRoleAnnotations.