[commit: ghc] master: Fix #14934 by including axSub0R in typeNatCoAxiomRules (c3aea39)

git at git.haskell.org git at git.haskell.org
Mon Mar 19 16:41:13 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/c3aea39678398fdf88166f30f0d01225a1874a32/ghc

>---------------------------------------------------------------

commit c3aea39678398fdf88166f30f0d01225a1874a32
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Mon Mar 19 12:05:36 2018 -0400

    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


>---------------------------------------------------------------

c3aea39678398fdf88166f30f0d01225a1874a32
 compiler/iface/TcIface.hs                          |  2 +-
 compiler/typecheck/TcTypeNats.hs                   | 93 +++++++++++++++++++---
 testsuite/tests/typecheck/should_compile/Makefile  |  5 ++
 testsuite/tests/typecheck/should_compile/T14934.hs |  9 +++
 .../should_compile/T14934a.hs}                     | 15 ++--
 testsuite/tests/typecheck/should_compile/all.T     |  2 +
 6 files changed, 110 insertions(+), 16 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc c3aea39678398fdf88166f30f0d01225a1874a32


More information about the ghc-commits mailing list