[GHC] #13972: GHC 8.2 error message around indexes for associated type instances is baffling

GHC ghc-devs at haskell.org
Thu Aug 17 14:16:29 UTC 2017


#13972: GHC 8.2 error message around indexes for associated type instances is
baffling
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.2.1-rc2
  checker)                           |             Keywords:  TypeFamilies,
      Resolution:                    |  TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Poor/confusing    |  Unknown/Multiple
  error message                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D3820
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ryan Scott <ryan.gl.scott@…>):

 In [changeset:"38260a9e9f8c38edd25f4b4c06e0ea5d88fc6bf2/ghc" 38260a9/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="38260a9e9f8c38edd25f4b4c06e0ea5d88fc6bf2"
 Fix #13972 by producing tidier errors

 Summary:
 Previously, one could experience an error message like this:

 ```
 Expected: T (a -> Either a b)
   Actual: T (a -> Either a b)
 ```

 This makes the error message an iota clearer by tidying it first, which
 will
 instead produce:

 ```
 Expected: T (a1 -> Either a1 b1)
   Actual: T (a -> Either a b)
 ```

 Which steers users towards the understanding that the two sets of tyvars
 are
 actually different.

 Test Plan: make test TEST=T13972

 Reviewers: simonpj, austin, bgamari, goldfire

 Reviewed By: goldfire

 Subscribers: goldfire, rwbarton, thomie

 GHC Trac Issues: #13972

 Differential Revision: https://phabricator.haskell.org/D3820
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13972#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list