#2622: sum and product thunkpile
----------------------------+-----------------------------------------------
Reporter: Bart Massey | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: libraries/base | Version: 6.9
Severity: major | Resolution: invalid
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Multiple
Os: Multiple |
----------------------------+-----------------------------------------------
Changes (by simonmar):
* status: new => closed
* difficulty: => Unknown
* resolution: => invalid
Comment:
We can't apply this patch, because it changes the semantics of sum &
product. Note that sum is overloaded, and there's no requirement that
`(+)` is strict for any given instance of `Num`.
When used at `Int` or `Integer`, we do indeed have strict specialised
versions of `sum`, but these don't get used inside GHCi, because GHCi
doesn't do optimisation. Perhaps there's a case that we should be doing
this kind of optimisation in GHCi, but that's another story (and should be
another ticket).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2622#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs