eof package:base

Succeeds iff we are at the end of input
I/O error where the operation failed because the end of file has been reached.
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.
The isSubsequenceOf function takes two lists and returns True if all the elements of the first list occur, in order, in the second. The elements do not have to occur consecutively. isSubsequenceOf x y is equivalent to x `elem` (subsequences y). Note: isSubsequenceOf is often used in infix form.

Examples

>>> "GHC" `isSubsequenceOf` "The Glorious Haskell Compiler"
True
>>> ['a','d'..'z'] `isSubsequenceOf` ['a'..'z']
True
>>> [1..10] `isSubsequenceOf` [10,9..0]
False
For the result to be True, the first list must be finite; for the result to be False, the second list must be finite:
>>> [0,2..10] `isSubsequenceOf` [0..]
True
>>> [0..] `isSubsequenceOf` [0,2..10]
False
>>> [0,2..] `isSubsequenceOf` [0..]
* Hangs forever*
The outer type constructor of the type
asProxyTypeOf 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 tag of the second.
>>> import GHC.Internal.Word

>>> :type asProxyTypeOf 123 (Proxy :: Proxy Word8)
asProxyTypeOf 123 (Proxy :: Proxy Word8) :: Word8
Note the lower-case proxy in the definition. This allows any type constructor with just one argument to be passed to the function, for example we could also write
>>> import GHC.Internal.Word

>>> :type asProxyTypeOf 123 (Just (undefined :: Word8))
asProxyTypeOf 123 (Just (undefined :: Word8)) :: Word8
Observe a type representation for the type of a value.
Read a value from a memory location given by a base address and offset. The following equality holds:
peekByteOff addr off = peek (addr `plusPtr` off)
Write a value to a memory location given by a base address and offset. The following equality holds:
pokeByteOff addr off x = poke (addr `plusPtr` off) x
Computes the storage requirements (in bytes) of the argument. The value of the argument is not used.
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 where the operation failed because the end of file has been reached.
Return the number of elements in the array.