PackedString.hGetPS produces index exception

Sigbjorn Finne sof at galois.com
Wed Apr 16 11:18:02 EDT 2003


Thanks, due to a bug in Data.Array.IO.hGetArray.

Notice that the current implementation of hGetPS doesn't
live up to its billing

-- | Read a 'PackedString' directly from the specified 'Handle'.  This
-- is far more efficient than reading the characters into a 'String'
-- and then using 'packString'.
--

as the implementation does indeed go via a String.

--sigbjorn

----- Original Message -----
From: "George Russell" <ger at tzi.de>
To: <glasgow-haskell-bugs at haskell.org>
Sent: Tuesday, April 15, 2003 11:29
Subject: PackedString.hGetPS produces index exception


> Why does the attached function psTest, for ghc5.04.3 on Linux, produce the
> error:
>     *** Exception: Ix{Int}.index: Index (30000) out of range ((0,29999))
>
  ...




More information about the Glasgow-haskell-bugs mailing list