[GHC] #15122: GHC HEAD typechecker regression

GHC ghc-devs at haskell.org
Wed May 23 14:11:55 UTC 2018


#15122: GHC HEAD typechecker regression
-------------------------------------+-------------------------------------
        Reporter:  fmixing           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.6.1
       Component:  Compiler (Type    |              Version:  8.5
  checker)                           |
      Resolution:                    |             Keywords:  TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"a32c8f7514c8192fa064537fb93d5a5c224991a0/ghc"
 a32c8f75/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="a32c8f7514c8192fa064537fb93d5a5c224991a0"
 Use dischargeFunEq consistently

 Trac #15122 turned out to be interesting.

 * Were calling dischargeFmv in three places.

 * In all three cases we dealt with the Given case
   separately.

 * In two of the three cases the Given code was right,
   (albeit duplicated).

 * In the third case (in TcCanonical.canCFunEqCan), we had
      ; case flav of
          Given -> return () -- nothing more to do.
   which was utterly wrong.

 The solution is easy: move the Given-case handling into
 dischargeFmv (now reenamed dischargeFunEq), and delete it
 from the call sites.

 Result: less code, easier to understand (dischargeFunEq handles
 all three cases, not just two out of three), and Trac #15122 is fixed.
 }}}

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


More information about the ghc-tickets mailing list