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 == minBou
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
___
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 th
People,
I observe the output difference in running ./Bug
and ./Bug >& log
(under Linux) for the program
import Dumatel
main = do calcInput <- readFile "List0.inp"
(putStr $ parseComputeShow calcInput)
where
parseComputeShow calcInpu
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, Fe
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 sk