[GHC] #13581: UNPACK should allow recursion that obviously terminates

GHC ghc-devs at haskell.org
Tue Apr 18 10:38:52 UTC 2017


#13581: UNPACK should allow recursion that obviously terminates
-------------------------------------+-------------------------------------
        Reporter:  ryanreich         |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.2
      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):

 I mean that given
 {{{
 data BigWord_Succ n = BigWord {-# UNPACK #-}(BigWord n}
                               {-# UNPACK #-}(BigWord n)
 }}}
 `n` is clearly polymorphic, so GHC can't simplify `(BigWord n)`.  And if
 it can't simplify it, it can't unpack it.

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


More information about the ghc-tickets mailing list