[GHC] #14323: Occurs check regressions in GHC 8.2.1 (and HEAD)

GHC ghc-devs at haskell.org
Thu Oct 5 09:41:35 UTC 2017


#14323: Occurs check regressions in GHC 8.2.1 (and HEAD)
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.2.1
  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 simonpj):

 Here's what is happening

 * The given `b ~ f b` has an occurs check, so it's insoluble. It's a bit
 like saying
 {{{
 f :: (Int ~ Bool) => blah
 }}}

 * In the long discussion on #12466 (see `Note [Given errors]` in
 `TcErrors` we decided not to complain about insoluble givens.

 * So the given `b ~ f b` is just parked.

 * Now we try to solve `b ~ f b`.  Lo, it has an occurs-check error.  Which
 we report.

 Seems reasonable to me, except for the lack of a complaint about the
 insoluble given; better ideas welcome (but look at #12466).

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


More information about the ghc-tickets mailing list