[ ghc-Bugs-441613 ] take (-1) [] fails
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 30 Jul 2001 03:13:47 -0700
Bugs item #441613, was opened at 2001-07-16 00:04
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=441613&group_id=8032
Category: Prelude
Group: 5.00
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: take (-1) [] fails
Initial Comment:
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...
----------------------------------------------------------------------
>Comment By: Simon Marlow (simonmar)
Date: 2001-07-30 03:13
Message:
Logged In: YES
user_id=48280
We don't have enough information to be able to analyse this
problem further. If the submitter is out there, could you
perhaps provide us with the code that fails? (and BTW,
could you login or otherwise include your email address in
the bug report next time so we can get in touch. Thanks.)
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=441613&group_id=8032