[GHC] #13371: instance selection too eager

GHC ghc-devs at haskell.org
Sat Mar 4 00:58:47 UTC 2017


#13371: instance selection too eager
-------------------------------------+-------------------------------------
        Reporter:  aavogt            |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.2
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 Actually, compiling these commits from the HEAD branch (instead of the
 8.0.2 branch) turned out to be more fruitful. I discovered that the commit
 which introduced this regression is
 c9bcaf3165586ac214fa694e61c55eb45eb131ab:

 {{{
 From c9bcaf3165586ac214fa694e61c55eb45eb131ab Mon Sep 17 00:00:00 2001
 From: Bartosz Nitka <niteria at gmail.com>
 Date: Tue, 26 Apr 2016 05:58:24 -0700
 Subject: [PATCH] Kill varSetElemsWellScoped in quantifyTyVars

 varSetElemsWellScoped introduces unnecessary non-determinism in
 inferred type signatures.
 Removing this instance required changing the representation of
 TcDepVars to use deterministic sets.
 This is the last occurence of varSetElemsWellScoped, allowing me to
 finally remove it.

 Test Plan:
 ./validate
 I will update the expected outputs when commiting, some reordering
 of type variables in types is expected.
 }}}

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


More information about the ghc-tickets mailing list