Ticket #2533 (closed proposal: fixed)
Generic functions that take integral arguments should work the same way as their prelude counterparts
| Reported by: | japple | Owned by: | igloo |
|---|---|---|---|
| Priority: | normal | Milestone: | Not GHC |
| Component: | libraries/base | Version: | 6.8.3 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

