Hoogle Search

Within LTS Haskell 24.32 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. readExactly :: Int -> InputStream ByteString -> IO ByteString

    io-streams System.IO.Streams.ByteString

    Reads an n-byte ByteString from an input stream. Throws a ReadTooShortException if fewer than n bytes were available. Example:

    ghci> Streams.fromList ["long string"] >>= Streams.readExactly 6
    "long s"
    ghci> Streams.fromList ["short"] >>= Streams.readExactly 6
    *** Exception: Short read, expected 6 bytes
    

  2. readProcess :: FilePath -> [String] -> String -> IO String

    io-streams System.IO.Streams.Process

    readProcess forks an external process, reads its standard output strictly, blocking until the process terminates, and returns the output string. The external process inherits the standard error. If an asynchronous exception is thrown to the thread executing readProcess, the forked process will be terminated and readProcess will wait (block) until the process has been terminated. Output is returned strictly, so this is not suitable for launching processes that require interaction over the standard file streams. This function throws an IOError if the process ExitCode is anything other than ExitSuccess. If instead you want to get the ExitCode then use readProcessWithExitCode. Users of this function should compile with -threaded if they want other Haskell threads to keep running while waiting on the result of readProcess.

    > readProcess "date" [] []
    "Thu Feb  7 10:03:39 PST 2008\n"
    
    The arguments are:
    • The command to run, which must be in the $PATH, or an absolute or relative path
    • A list of separate command line arguments to the program. See RawCommand for further discussion of Windows semantics.
    • A string to pass on standard input to the forked process.

  3. readProcessWithExitCode :: FilePath -> [String] -> String -> IO (ExitCode, String, String)

    io-streams System.IO.Streams.Process

    readProcessWithExitCode is like readProcess but with two differences:

    • it returns the ExitCode of the process, and does not throw any exception if the code is not ExitSuccess.
    • it reads and returns the output from process' standard error handle, rather than the process inheriting the standard error handle.
    On Unix systems, see waitForProcess for the meaning of exit codes when the process died as the result of a signal.

  4. readFromPathPiece :: Read s => Text -> Maybe s

    path-pieces Web.PathPieces

    A function for helping generate free PathPiece instances for enumeration data types that have derived Read and Show instances. Intended to be used like this:

    data MyData = Foo | Bar | Baz
    deriving (Read,Show)
    instance PathPiece MyData where
    fromPathPiece = readFromPathPiece
    toPathPiece = showToPathPiece
    
    Since 0.2.1.

  5. readWriteMode :: TransactionMode -> !ReadWriteMode

    postgresql-simple Database.PostgreSQL.Simple.Transaction

    No documentation available.

  6. readSettingsFile :: Maybe FilePath -> String -> IO (FilePath, Maybe String)

    hlint Language.Haskell.HLint

    Given a directory (or Nothing to imply getHLintDataDir), and a module name (e.g. HLint.Default), find the settings file associated with it, returning the name of the file, and (optionally) the contents. This function looks for all settings files starting with HLint. in the directory argument, and all other files relative to the current directory.

  7. readFileBinary :: MonadIO m => FilePath -> m ByteString

    rio RIO

    Same as readFile, but generalized to MonadIO

  8. readFileUtf8 :: MonadIO m => FilePath -> m Text

    rio RIO

    Read a file in UTF8 encoding, throwing an exception on invalid character encoding. This function will use OS-specific line ending handling.

  9. readSomeRef :: MonadIO m => SomeRef a -> m a

    rio RIO

    Read from a SomeRef

  10. readURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> m a

    rio RIO

    Read the value in a URef

Page 121 of many | Previous | Next