Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2488 closed bug (fixed)

ByteString hGet documentation is incomplete

Reported by: cjs Owned by: dons
Priority: normal Milestone:
Component: libraries/base Version: 6.8.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

All four versions of hGet for the various Data.ByteString implementations claim that it "[reads] n bytes into a ByteString." This is not always the case. For example, it appears that on EOF less than n bytes are read. The conditions under which it will not succeed in reading n bytes into a ByteString (be it less than n, or it raising some sort of error) should be documented.

Change History (4)

comment:1 Changed 9 years ago by dons

Owner: set to dons

Fixed. I've documented hGet's behaviour wrt. EOF and handles closing. The next release will contain this documentation.

comment:2 Changed 9 years ago by dons

Resolution: fixed
Status: newclosed

comment:3 Changed 9 years ago by simonmar

Architecture: MultipleUnknown/Multiple

comment:4 Changed 9 years ago by simonmar

Operating System: MultipleUnknown/Multiple
Note: See TracTickets for help on using tickets.