[GHC] #2823: Another arity expansion bug

GHC ghc-devs at haskell.org
Mon Feb 10 16:52:21 UTC 2014


#2823: Another arity expansion bug
--------------------------------------------+------------------------------
        Reporter:  simonpj                  |            Owner:
            Type:  bug                      |           Status:  closed
        Priority:  lowest                   |        Milestone:  7.6.2
       Component:  Compiler                 |          Version:  6.10.1
      Resolution:  fixed                    |         Keywords:
Operating System:  Unknown/Multiple         |     Architecture:
 Type of failure:  Runtime performance bug  |  Unknown/Multiple
       Test Case:                           |       Difficulty:  Unknown
        Blocking:                           |       Blocked By:
                                            |  Related Tickets:
--------------------------------------------+------------------------------
Changes (by nomeata):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 It seems that this has been fixed in ghc-7.6.3 or before:
 {{{
 T2823.foo [InlPrag=NOINLINE]
   :: forall a. GHC.Classes.Eq a => a -> a
 [GblId, Arity=2, Caf=NoCafRefs, Str=DmdType AS]
 T2823.foo = \ (@ a) _ (x :: a) -> x

 T2823.bar [InlPrag=INLINE[1] (sat-args=1)]
   :: forall a. GHC.Classes.Eq a => a -> a
 [GblId,
  Arity=2,
  Caf=NoCafRefs,
  Str=DmdType LL]
 T2823.bar =
   \ (@ a) ($dEq :: GHC.Classes.Eq a) (eta :: a) ->
     let {
       p [Dmd=Just L] :: (a, a)
       [LclId, Str=DmdType]
       p =
         T2823.foo
           @ (a, a) (GHC.Classes.$fEq(,) @ a @ a $dEq $dEq) (eta, eta) } in
     let {
       $dEq1 [Dmd=Just A] :: GHC.Classes.Eq (a, a)
       [LclId, Str=DmdType]
       $dEq1 = GHC.Classes.$fEq(,) @ a @ a $dEq $dEq } in
     case T2823.foo
            @ ((a, a), (a, a))
            (GHC.Classes.$fEq(,) @ (a, a) @ (a, a) $dEq1 $dEq1)
            (p, p)
     of _ { (x, _) ->
     case x of _ { (x1, ds2) -> x1 }
     }
 }}}

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


More information about the ghc-tickets mailing list