Hoogle Search

Within LTS Haskell 24.67 (ghc-9.10.3)

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

  1. readerS :: forall (m :: Type -> Type) cl a r b . Monad m => ClSF m cl (a, r) b -> ClSF (ReaderT r m) cl a b

    rhine FRP.Rhine.ClSF.Reader

    Create ("wrap") a ReaderT layer in the monad stack of a behaviour. Each tick, the ReaderT side effect is performed by passing the original behaviour the extra r input.

  2. readBinary :: FilePath -> Sh ByteString

    shelly Shelly

    Wraps readFile.

  3. readfile :: FilePath -> Sh Text

    shelly Shelly

    No documentation available.

  4. readBinary :: MonadSh m => FilePath -> m ByteString

    shelly Shelly.Lifted

    No documentation available.

  5. readfile :: MonadSh m => FilePath -> m Text

    shelly Shelly.Lifted

    No documentation available.

  6. readBinary :: FilePath -> Sh ByteString

    shelly Shelly.Pipe

    see readBinary

  7. readfile :: FilePath -> Sh Text

    shelly Shelly.Pipe

    see readFile

  8. readFile :: forall (m :: Type -> Type) . MonadResource m => FilePath -> ByteStream m ()

    streaming-bytestring Streaming.ByteString

    Read an entire file into a chunked ByteStream IO (). The handle will be held open until EOF is encountered. The block governed by runResourceT will end with the closing of any handles opened.

    >>> :! cat hello.txt
    Hello world.
    Goodbye world.
    
    >>> runResourceT $ Q.stdout $ Q.readFile "hello.txt"
    Hello world.
    Goodbye world.
    

  9. readFile :: forall (m :: Type -> Type) . MonadResource m => FilePath -> ByteStream m ()

    streaming-bytestring Streaming.ByteString.Char8

    Read an entire file into a chunked ByteStream IO (). The handle will be held open until EOF is encountered. The block governed by runResourceT will end with the closing of any handles opened.

    >>> :! cat hello.txt
    Hello world.
    Goodbye world.
    
    >>> runResourceT $ Q.stdout $ Q.readFile "hello.txt"
    Hello world.
    Goodbye world.
    

  10. readInt :: Monad m => ByteStream m r -> m (Compose (Of (Maybe Int)) (ByteStream m) r)

    streaming-bytestring Streaming.ByteString.Char8

    Try to read an Int value from the ByteString, returning m (Compose (Just val :> str)) on success, where val is the value read and str is the rest of the input stream. If the stream of digits decodes to a value larger than can be represented by an Int, the returned value will be m (Compose (Nothing :> str)), where the content of str is the same as the original stream, but some of the monadic effects may already have taken place, so the original stream MUST NOT be used. To read the remaining data, you MUST use the returned str. This function will not read an unreasonably long stream of leading zero digits when trying to decode a number. When reading the first non-zero digit would require requesting a new chunk and ~32KB of leading zeros have already been read, the conversion is aborted and Nothing is returned, along with the overly long run of leading zeros (and any initial explicit plus or minus sign). readInt does not ignore leading whitespace, the value must start immediately at the beginning of the input stream. Use skipSomeWS if you want to skip a reasonable quantity of leading whitespace.

    Example

    >>> getCompose <$> (readInt . skipSomeWS) stream >>= \case
    
    >>>     Just n  :> rest -> print n >> gladly rest
    
    >>>     Nothing :> rest -> sadly rest
    

Page 229 of many | Previous | Next