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.
-
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.
readBinary :: FilePath -> Sh ByteStringshelly Shelly Wraps readFile.
readfile :: FilePath -> Sh Textshelly Shelly No documentation available.
readBinary :: MonadSh m => FilePath -> m ByteStringshelly Shelly.Lifted No documentation available.
readfile :: MonadSh m => FilePath -> m Textshelly Shelly.Lifted No documentation available.
readBinary :: FilePath -> Sh ByteStringshelly Shelly.Pipe see readBinary
readfile :: FilePath -> Sh Textshelly Shelly.Pipe see readFile
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.
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.
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