Fix #14934 by including axSub0R in typeNatCoAxiomRules
For some reason, `axSub0R` was left out of `typeNatCoAxiomRules` in `TcTypeNats`, which led to disaster when trying to look up `Sub0R` from an interface file, as demonstrated in #14934. The fix is simple—just add `axSub0R` to that list. To help prevent an issue like this happening in the future, I added a `Note [Adding built-in type families]` to `TcTypeNats`, which contains a walkthrough of all the definitions in `TcTypeNats` you need to update when adding a new built-in type family. Test Plan: make test TEST=T14934 Reviewers: bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie, carter GHC Trac Issues: #14934 Differential Revision: https://phabricator.haskell.org/D4508
Showing
- compiler/iface/TcIface.hs 1 addition, 1 deletioncompiler/iface/TcIface.hs
- compiler/typecheck/TcTypeNats.hs 84 additions, 9 deletionscompiler/typecheck/TcTypeNats.hs
- testsuite/tests/typecheck/should_compile/Makefile 5 additions, 0 deletionstestsuite/tests/typecheck/should_compile/Makefile
- testsuite/tests/typecheck/should_compile/T14934.hs 9 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T14934.hs
- testsuite/tests/typecheck/should_compile/T14934a.hs 14 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T14934a.hs
- testsuite/tests/typecheck/should_compile/all.T 2 additions, 0 deletionstestsuite/tests/typecheck/should_compile/all.T
Loading
Please register or sign in to comment