Hoogle Search
Within LTS Haskell 24.58 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
computeOverhead :: HashTable s k v -> ST s Doublehashtables Data.HashTable.ST.Linear See the documentation for this function in Data.HashTable.Class#v:computeOverhead.
-
xml Text.XML.Light.Output The XML 1.0 header
thead_ :: Term arg result => arg -> resultlucid Lucid.Html5 thead element
unsafeHead :: Storable a => Vector a -> astorablevector Data.StorableVector.Base A variety of head for non-empty Vectors. unsafeHead omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the Vector is non-empty.
hReadEntryHeader :: Handle -> TarEntryOffset -> IO Entrytar 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.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.
_head :: Cons s s a a => Traversal' s adiagrams-lib Diagrams.Prelude A Traversal reading and writing to the head of a non-empty container.
>>> [a,b,c]^? _head Just a
>>> [a,b,c] & _head .~ d [d,b,c]
>>> [a,b,c] & _head %~ f [f a,b,c]
>>> [] & _head %~ f []
>>> [1,2,3]^?!_head 1
>>> []^?_head Nothing
>>> [1,2]^?_head Just 1
>>> [] & _head .~ 1 []
>>> [0] & _head .~ 2 [2]
>>> [0,1] & _head .~ 2 [2,1]
This isn't limited to lists. For instance you can also traverse the head of a Seq:>>> Seq.fromList [a,b,c,d] & _head %~ f fromList [f a,b,c,d]
>>> Seq.fromList [] ^? _head Nothing
>>> Seq.fromList [a,b,c,d] ^? _head Just a
_head :: Traversal' [a] a _head :: Traversal' (Seq a) a _head :: Traversal' (Vector a) a
_arrowHead :: ArrowOpts n -> ArrowHT ndiagrams-lib Diagrams.TwoD No documentation available.
_headGap :: ArrowOpts n -> Measure ndiagrams-lib Diagrams.TwoD No documentation available.
_headLength :: ArrowOpts n -> Measure ndiagrams-lib Diagrams.TwoD No documentation available.