[GHC] #12444: Regression: panic! on inaccessible code with constraint

GHC ghc-devs at haskell.org
Wed Aug 24 08:27:37 UTC 2016


#12444: Regression: panic! on inaccessible code with constraint
-------------------------------------+-------------------------------------
        Reporter:  zilinc            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash                              |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I spent some time investigating. Here's a smaller test case.  This
 program, closely related to the original, makes the constraint solver
 loop:
 {{{
 data Nat = Zero | Succ Nat

 data SNat (n :: Nat)

 type family (:+:) (a :: Nat) (b :: Nat) :: Nat where
   m :+: Zero = m
   m :+: (Succ n) = Succ (m :+: n)

 foo :: SNat (Succ c) -> SNat b -> SNat (Succ (c :+: b))
 foo _ x = x
 }}}

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


More information about the ghc-tickets mailing list