[GHC] #12468: GADTs don't refine hole types

GHC ghc-devs at haskell.org
Fri May 19 10:11:53 UTC 2017


#12468: GADTs don't refine hole types
-------------------------------------+-------------------------------------
        Reporter:  benjamin.hodgson  |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11325            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

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

 In [changeset:"433b80dec1cfef787fc1327a9eada1791b11c12e/ghc" 433b80d/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="433b80dec1cfef787fc1327a9eada1791b11c12e"
 Ensure that insolubles are fully rewritten

 I was alerted to this by Trac #12468 and #11325.  We were treating
 insolubles (and "hole" constraints are treated as insoluble)
 inconsistently.  In some places we were carefully rewriting them
 e.g. Note [Make sure that insolubles are fully rewritten] in
 TcCanonical.  But in TcSimplify we weren't feeding them into
 the solver.

 As a result, "hole" constraints were not being rewritten, which
 some users found confusing, and I think rightly so.

 This patch also fixes a bug in TcSMonad.emitInsoluble, in which two
 different "hole" constriants could be treated (bogusly) as duplicates,
 thereby losing one.
 }}}

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


More information about the ghc-tickets mailing list