Compiler optimizations questions for ghc 6.10...
kr.angelov at gmail.com
Fri Feb 20 03:48:10 EST 2009
Well I actually did, almost. I added this function:
quotX :: Int -> Int -> Int
a `quotX` b
| b == 0 = error "divZeroError"
| b == (-1) && a == minBound = error "overflowError"
| otherwise = a `quotInt` b
It does the right thing. However to be sure that this doesn't
interfere with some other GHC magic the real quot function have to be
changed and tested. I haven't build GHC from source for 2-3 years now
and I don't have the time to do it just to test whether this works.
On Fri, Feb 20, 2009 at 9:22 AM, Bulat Ziganshin
<bulat.ziganshin at gmail.com> wrote:
> Hello Krasimir,
> Friday, February 20, 2009, 11:00:30 AM, you wrote:
>> and this is exactly what we get. I bet that if the original function was:
> well, you check this yourself! :)
> Best regards,
> Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Glasgow-haskell-users