Hoogle Search
Within LTS Haskell 24.9 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
hGetContents' :: Handle -> IO Stringbase-compat System.IO.Compat The hGetContents' operation reads all input on the given handle before returning it as a String and closing the handle.
targetContents :: Target -> !Maybe (InputFileBuffer, UTCTime)ghc GHC Optional in-memory buffer containing the source code GHC should use for this target instead of reading it from disk. Since GHC version 8.10 modules which require preprocessors such as Literate Haskell or CPP to run are also supported. If a corresponding source file does not exist on disk this will result in a SourceError exception if targetId = TargetModule _ is used. However together with targetId = TargetFile _ GHC will not complain about the file missing.
targetContents :: Target -> !Maybe (InputFileBuffer, UTCTime)ghc GHC.Types.Target Optional in-memory buffer containing the source code GHC should use for this target instead of reading it from disk. Since GHC version 8.10 modules which require preprocessors such as Literate Haskell or CPP to run are also supported. If a corresponding source file does not exist on disk this will result in a SourceError exception if targetId = TargetModule _ is used. However together with targetId = TargetFile _ GHC will not complain about the file missing.
fileGetContents :: (HasCallStack, MonadIO m) => [Char] -> m ByteStringgi-glib GI.GLib.Functions Reads an entire file into allocated memory, with good error checking. If the call was successful, it returns True and sets contents to the file contents and length to the length of the file contents in bytes. The string stored in contents will be nul-terminated, so for text files you can pass Nothing for the length argument. If the call was not successful, it returns False and sets error. The error domain is G_FILE_ERROR. Possible error codes are those in the FileError enumeration. In the error case, contents is set to Nothing and length is set to zero.
mappedFileGetContents :: (HasCallStack, MonadIO m) => MappedFile -> m Textgi-glib GI.GLib.Structs.MappedFile Returns the contents of a MappedFile. Note that the contents may not be zero-terminated, even if the MappedFile is backed by a text file. If the file is empty then Nothing is returned. Since: 2.8
hGetContents :: Handle -> IO Stringstrict System.IO.Strict Computation hGetContents hdl returns the list of characters corresponding to the unread portion of the channel or file managed by hdl, which is immediate closed. Items are read strictly from the input Handle. This operation may fail with:
- isEOFError if the end of file has been reached.
hGetContents :: MonadIO m => Handle -> m ByteStringrio RIO.ByteString Lifted hGetContents
hGetContents :: MonadIO m => Handle -> m LByteStringrio RIO.ByteString.Lazy Lifted hGetContents
buf_hGetContents :: BufferOp a -> Handle -> IO aHTTP Network.BufferType No documentation available.
hGetContentsAsync :: Storable a => ChunkSize -> Handle -> IO (IOError, Vector a)storablevector Data.StorableVector.Lazy Read the rest of a file lazily and provide the reason of termination as IOError. If IOError is EOF (check with System.Error.isEOFError err), then the file was read successfully. Only access the final IOError after you have consumed the file contents, since finding out the terminating reason forces to read the entire file. Make also sure you read the file completely, because it is only closed when the file end is reached (or an exception is encountered). TODO: In ByteString.Lazy the chunk size is reduced if data is not immediately available. Maybe we should adapt that behaviour but when working with realtime streams that may mean that the chunks are very small.