#2533: Generic functions that take integral arguments should work the same way 
as
their prelude counterparts
-------------------------+--------------------------------------------------
    Reporter:  japple    |       Owner:                
        Type:  proposal  |      Status:  new           
    Priority:  normal    |   Component:  libraries/base
     Version:  6.8.3     |    Severity:  normal        
    Keywords:            |    Testcase:                
Architecture:  Unknown   |          Os:  Unknown       
-------------------------+--------------------------------------------------
 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.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2533>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to