[GHC] #12860: GeneralizedNewtypeDeriving + MultiParamTypeClasses sends typechecker into an infinite loop

GHC ghc-devs at haskell.org
Tue Apr 17 14:43:49 UTC 2018


#12860: GeneralizedNewtypeDeriving + MultiParamTypeClasses sends typechecker into
an infinite loop
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |             Keywords:  FunDeps,
      Resolution:                    |  deriving
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 I'm afraid that won't work either. `checkInstTermination` only checks the
 Paterson termination conditions, not the fundep coverage conditions (which
 are checked separately in `checkInstCoverage`).

 Indeed, I just tried calling `checkInstTermination` after every iteration
 of `simplifyDeriv`, but the original program still loops even with that,
 since `C b a` passes the Paterson termination conditions.

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


More information about the ghc-tickets mailing list