Re: Compiler optimizations questions for ghc 6.10...

2009-02-20 Thread Krasimir Angelov
I think that what happens is that this function: a `quot` b | b == 0 = divZeroError | a == minBound b == (-1) = overflowError | otherwise = a `quotInt` b is expanded to: a `quot` b = if b == 0 then divZeroError else if a ==

Re[2]: Compiler optimizations questions for ghc 6.10...

2009-02-20 Thread Bulat Ziganshin
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, Bulatmailto:bulat.zigans...@gmail.com

Re: Re[2]: Compiler optimizations questions for ghc 6.10...

2009-02-20 Thread Krasimir Angelov
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

Re: ./T and ./T log

2009-02-20 Thread Lennart Augustsson
I'm just guessing, but it looks like a buffering problem. When a program dies an abnormal death (like the Bug: thing probably is) then the stdout buffer is not flushed and you'll miss that bit of the output. You could set stdout in NoBuffering mode and see if that helps. -- Lennart On Fri, Feb

Re: ./T and ./T log

2009-02-20 Thread Brandon S. Allbery KF8NH
On 2009 Feb 20, at 4:38, Serge D. Mechveliani wrote: The first command outputs - t = ((a : nil) + (b : nil)) Bug: substitute {(X, a), (Xs, nil), (Ys, (b : nil))} X: sort mismatch in substitution - And the second command