Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

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

  1. unsafeRead :: Storable e => Vector s e -> Int -> ST s e

    storablevector Data.StorableVector.ST.Lazy

    No documentation available.

  2. maybeRead :: Storable e => Vector s e -> Int -> ST s (Maybe e)

    storablevector Data.StorableVector.ST.Strict

    Returns Just e, when the element e could be read and Nothing if the index was out of range. This way you can avoid duplicate index checks that may be needed when using read.

    Control.Monad.ST.runST (do arr <- new_ 10; Monad.zipWithM_ (write arr) [9,8..0] ['a'..]; read arr 3)
    
    In future maybeRead will replace read.

  3. unsafeRead :: Storable e => Vector s e -> Int -> ST s e

    storablevector Data.StorableVector.ST.Strict

    No documentation available.

  4. hReadEntry :: Handle -> TarEntryOffset -> IO Entry

    tar Codec.Archive.Tar.Index

    Reads an entire Entry at the given TarEntryOffset in the tar file. The Handle must be open for reading and be seekable. This reads the whole entry into memory strictly, not incrementally. For more control, use hReadEntryHeader and then read the entry content manually.

  5. hReadEntryHeader :: Handle -> TarEntryOffset -> IO Entry

    tar Codec.Archive.Tar.Index

    Read the header for a Entry at the given TarEntryOffset in the tar file. The entryContent will contain the correct metadata but an empty file content. The Handle must be open for reading and be seekable. The Handle position is advanced to the beginning of the entry content (if any). You must check the entryContent to see if the entry is of type NormalFile. If it is, the NormalFile gives the content length and you are free to read this much data from the Handle.

    entry <- Tar.hReadEntryHeader hnd
    case Tar.entryContent entry of
    Tar.NormalFile _ size -> do content <- BS.hGet hnd size
    ...
    
    Of course you don't have to read it all in one go (as hReadEntry does), you can use any appropriate method to read it incrementally. In addition to I/O errors, this can throw a FormatError if the offset is wrong, or if the file is not valid tar format. There is also the lower level operation hSeekEntryOffset.

  6. hReadEntryHeaderOrEof :: Handle -> TarEntryOffset -> IO (Maybe (Entry, TarEntryOffset))

    tar Codec.Archive.Tar.Index

    This is a low level variant on hReadEntryHeader, that can be used to iterate through a tar file, entry by entry. It has a few differences compared to hReadEntryHeader:

    • It returns an indication when the end of the tar file is reached.
    • It does not move the Handle position to the beginning of the entry content.
    • It returns the TarEntryOffset of the next entry.
    After this action, the Handle position is not in any useful place. If you want to skip to the next entry, take the TarEntryOffset returned and use hReadEntryHeaderOrEof again. Or if having inspected the Entry header you want to read the entry content (if it has one) then use hSeekEntryContentOffset on the original input TarEntryOffset.

  7. formatReadP :: Format t -> ReadP t

    time-compat Data.Time.Format.ISO8601.Compat

    Read a value in the format

  8. formatReadPExtension :: (FormatExtension -> Format t) -> ReadP t

    time-compat Data.Time.Format.ISO8601.Compat

    Read a value in either extended or basic format

  9. data SpreadMethod

    diagrams-lib Diagrams.TwoD

    The SpreadMethod determines what happens before lGradStart and after lGradEnd. GradPad fills the space before the start of the gradient with the color of the first stop and the color after end of the gradient with the color of the last stop. GradRepeat restarts the gradient and GradReflect restarts the gradient with the stops in reverse order.

  10. _lGradSpreadMethod :: LGradient n -> SpreadMethod

    diagrams-lib Diagrams.TwoD

    No documentation available.

Page 494 of many | Previous | Next