take (-1)  fails
|Reported by:||nobody||Owned by:||nobody|
|Type of failure:||Test Case:|
|Related Tickets:||Differential Revisions:|
As described in the Haskell report, Prelude.take applied to a negative argument and an empty list should return an empty list. Hugs and HBC implements this correctly, but GHC's implementation instead produces Exception: Prelude.take: negative index I have two large programs, that work fine when compiled with HBC, and fail because of this when compiled when GHC. I have examined all direct calls to take in one of them and I am 93.7% certain that they cannot be the cause of the problem, so I suspect the offending call to take comes from another prelude/library function...
Change History (4)
Note: See TracTickets for help on using tickets.