[GHC] #12921: initTc: unsolved constraints

GHC ghc-devs at haskell.org
Thu Jan 12 12:58:12 UTC 2017


#12921: initTc: unsolved constraints
-------------------------------------+-------------------------------------
        Reporter:  jlp               |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  MacOS X           |         Architecture:  x86_64
 Type of failure:  Compile-time      |  (amd64)
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13106            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

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

 In [changeset:"f5f6d4237b87f5d0e3e0a05e4cfc52bb3c0e4ad9/ghc"
 f5f6d423/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="f5f6d4237b87f5d0e3e0a05e4cfc52bb3c0e4ad9"
 Fix top-level constraint handling (Trac #12921)

 Some out-of-scope errors were not being reported if anyone
 throws an un-caught exception in the TcM monad.  That led to

   ghc: panic! (the 'impossible' happened)
         initTc: unsolved constraints

 I fixed this

 * Splitting captureConstraints to use an auxilliary
   tryCaptureConstraints (which never fails)

 * Define a new TcSimplify.captureTopConstraints (replacing
   the old TcRnMonad.captureTopConstraints), which reports
   any unsolved out-of-scope constraints before propagating
   the exception

 That in turn allowed me to do some tidying up of the static-constraint
 machinery, reducing duplication.

 Also solves #13106.
 }}}

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


More information about the ghc-tickets mailing list