Generic functions that take integral arguments should work the same way as their prelude counterparts
The Prelude functions drop, take, and splitAt are unfailing (never call error). This patch changes the Data.List generic versions to behave the same way. At present, they call error on negative arguments.
quickCheck (\x n -> take n x == genericTake n x) quickCheck (\x n -> drop n x == genericDrop n x) quickCheck (\x n -> splitAt n x == genericSplitAt n x)
The library submission procedures say
If the changes update Haddoc [sic] documentation, also attach the resulting Haddock-generated pages.
Haddock fails on the file because of existing CPP commands.
Trac metadata
Trac field | Value |
---|---|
Version | 6.8.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries/base |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown |
Architecture | Unknown |