[GHC] #10691: certain operations in new integer-gmp are too lazy

GHC ghc-devs at haskell.org
Sun Jul 26 07:04:21 UTC 2015


#10691: certain operations in new integer-gmp are too lazy
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  libraries         |                 Version:  7.10.1
  (other)                            |
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Replying to [comment:1 hvr]:
 > Bummer... I put quite some effort to model the `Integer` type to allow
 for such case-analysis for being able to avoid allocations and FFI calls
 in case of operations with absorbing elements... :-/
 >
 > I wonder if and how `nofib` will regress if e.g. `0` doesn't shortcut
 anymore...

 You can still save the work of doing a multiplication in GMP, you just
 have to force evaluation of the other argument when you do so.

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


More information about the ghc-tickets mailing list