- Make our invariants more explicit; add an assertion to verify.
- Rewrite calls of tagToEnum# to known-invalid tags into error calls.
|No Unit Test Coverage|
|Build 35398: [GHC] Linux/amd64: Patch building|
|Build 35397: [GHC] OSX/amd64: Continuous Integration|
|Build 35396: [GHC] Windows/amd64: Continuous Integration|
|Build 35395: arc lint + arc unit|
I don't think we want to panic for an out-of-bound tag, no. But I believe these WARN pragmas only work when GHC is compiled for debugging. It might make sense to upgrade to whatever mechanism would produce the warning more broadly. We might want to panic for the inappropriate type case that was already there; I'm really not sure if that code is supposed to be reachable at the moment.