No warning for Incorrect display of 15! (factorial 15) when type is Int -> Int
GHCi version: 7.0.4
Offending function:
factorial :: Int -> Int factorial 0 = 1 factorial n = n * factorial (n-1)
Correct answer is displayed (as expected) when type is
factorial :: Integer -> Integer
THE BUG IS THE DISPLAY OF A CORRECT-LOOKING INCORRECT ANSWER THAT RESULTED FROM (UNREPORTED) OVERFLOW OF Int (but not of Integer)
~~ Thank you
Trac metadata
Trac field | Value |
---|---|
Version | 7.0.4 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |