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. 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.
    

  2. 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.
    

  3. 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
    

  4. readSV :: (Storable a => Vector a -> b) -> Storage (Vector a) => Vector a -> b

    synthesizer-core Synthesizer.Generic.Signal

    No documentation available.

  5. readSVL :: (Storable a => Vector a -> b) -> Storage (Vector a) => Vector a -> b

    synthesizer-core Synthesizer.Generic.Signal

    No documentation available.

  6. readAIFFMono :: C a => FilePath -> IO [a]

    synthesizer-core Synthesizer.Plain.File

    Deprecated: Use readMonoFromInt16 instead

  7. readMonoFromInt16 :: C a => FilePath -> IO [a]

    synthesizer-core Synthesizer.Plain.File

    I suspect we cannot handle file closing properly.

  8. readInt16StreamStrict :: FilePath -> IO [Int16]

    synthesizer-core Synthesizer.Plain.IO

    The end of the list is undefined, if the file has odd length. It would be better if it throws an exception.

  9. readLEInt16Stream :: FilePath -> IO [Int16]

    synthesizer-core Synthesizer.Plain.IO

    The end of the list is undefined, if the file has odd length. It would be better if it throws an exception.

  10. readFile :: FilePath -> IO ByteString

    system-fileio Filesystem

    Read in the entire content of a binary file. This computation throws IOError on failure. See “Classifying I/O errors” in the System.IO.Error documentation for information on why the failure occured.

Page 229 of many | Previous | Next