mkStdGen (-2^31) is ⊥
|Reported by:||ion1||Owned by:|
|Type of failure:||Incorrect result at runtime||Difficulty:|
|Test Case:||Blocked By:|
mkStdGen32 :: Int32 -> StdGen mkStdGen32 s | s < 0 = mkStdGen32 (-s)
Alas, the fact that…
ghci> (minBound :: Data.Int.Int32) == negate minBound True
…results in mkStdGen32 going into infinite recursion when applied to the minBound of Int32.
The proposed patch should fix the issue.