[GHC] #13055: Adding INLINABLE pragma causes GHC panic

GHC ghc-devs at haskell.org
Mon Jan 2 16:56:17 UTC 2017


#13055: Adding INLINABLE pragma causes GHC panic
-------------------------------------+-------------------------------------
        Reporter:  mpickering        |                Owner:
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      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 rwbarton):

 Oh never mind, the unfolding is in the panic.

 In a normal build, I have this unfolding information
 {{{
 e8b07c72a9d4975f2b942de3da1a768e
   (<**>) :: Applicative f => f a -> f (a -> b) -> f b
   {- Arity: 3, HasNoCafRefs,
      Strictness:
 <S(LLC(C(S))LL),U(1*U(1*C1(C1(U)),A),A,1*C1(C1(U)),A,A)><L,U><L,U>,
      Unfolding: InlineRule (3, True, False)
                 (\ @ f :: * -> *
                    @ a
                    @ b
                    ($dApplicative :: Applicative f)
                    (eta :: f a)
                    (eta1 :: f (a -> b)) ->
                  <*>
                    @ f
                    $dApplicative
                    @ (a -> b)
                    @ b
                    (fmap
                       @ f
                       ($p1Applicative @ f $dApplicative)
                       @ a
                       @ ((a -> b) -> b)
                       (<**>1 @ a @ b)
                       eta)
                    eta1) -}
 5729c051546f23f4fa0f6405530960ae
   <**>1 :: a -> (a -> b) -> b
   {- Arity: 2, HasNoCafRefs, Strictness: <L,U><C(S),1*C1(U)>,
      Unfolding: InlineRule (2, True, True)
                 (\ @ a @ b (x :: a) (y :: a -> b) -> y x) -}
 }}}
 so GHC optimized the unfolding, and it no longer mentions `($)` directly.

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


More information about the ghc-tickets mailing list