[GHC] #14686: -XStrict language extension makes behavior change

GHC ghc-devs at haskell.org
Fri Jan 19 08:34:26 UTC 2018


#14686: -XStrict language extension makes behavior change
-------------------------------------+-------------------------------------
        Reporter:  jeiea             |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.2
      Resolution:  invalid           |             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:                    |
-------------------------------------+-------------------------------------
Changes (by simonpj):

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


Comment:

 With `-XStrict`, the `where` binding is strict (see 10.28.3 in
 [http://downloads.haskell.org/~ghc/master/users-guide/glasgow_exts.html
 #bang-patterns-and-strict-haskell the user manual]).  So every call to
 `shouldBe0 x` calls `shouldBe0 (x-1)`, which calls `shouldBe0 (x-2)` and
 so on.  Hence divergence.

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


More information about the ghc-tickets mailing list