eof -haskell-src
Succeeds iff we are at the end of input
I/O error reached.
This parser only succeeds at the end of the input. This is not a primitive parser but it is defined using notFollowedBy.
> eof = notFollowedBy anyToken <?> "end of input"
asTypeOf is a type-restricted version of const. It is usually used as an infix operator, and its typing forces its first argument (which is usually overloaded) to have the same type as the second.
For a readable handle hdl, hIsEOF hdl returns True if no further input can be taken from hdl or for a physical file, if the current I/O position is equal to the length of the file. Otherwise, it returns False.
NOTE: hIsEOF may block, because it has to attempt to read from the stream to determine whether there is any more data to be read.
The computation isEOF is identical to hIsEOF, except that it works only on stdin.
An error indicating that an IO operation failed because the end of file has been reached.
I/O error reached.
Show more results