Hoogle Search
Within LTS Haskell 24.31 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
Efficient algorithms for vector arrays Efficient algorithms for sorting vector arrays. At some stage other vector algorithms may be added.
vectorOutputStream :: Vector v c => IO (OutputStream c, IO (v c))io-streams System.IO.Streams.Vector vectorOutputStream returns an OutputStream which stores values fed into it and an action which flushes all stored values to a vector. The flush action resets the store. Note that this function will buffer any input sent to it on the heap. Please don't use this unless you're sure that the amount of input provided is bounded and will fit in memory without issues.
ghci> (os, flush) <- Streams.vectorOutputStream :: IO (OutputStream Int, IO (V.Vector Int)) ghci> Streams.write (Just 1) os ghci> Streams.write (Just 2) os ghci> flush fromList [1,2] ghci> Streams.write (Just 3) os ghci> Streams.write Nothing os ghci> Streams.write (Just 4) os ghci> flush fromList [3]
vectorOutputStreamSized :: Vector v c => Int -> IO (OutputStream c, IO (v c))io-streams System.IO.Streams.Vector Like vectorOutputStream, but allows control over how large the vector buffer is to start with.
vectorSort :: (Vector v e, Ord e) => v e -> v emono-traversable Data.Sequences Sort a vector.
vectorSortBy :: Vector v e => (e -> e -> Ordering) -> v e -> v emono-traversable Data.Sequences Sort a vector using an supplied element ordering function.
vectorCodec :: ValueCodec input output -> ValueCodec (Vector input) (Vector output)autodocodec Autodocodec Vector codec Build a codec for vectors of values from a codec for a single value.
Example usage
>>> toJSONVia (vectorCodec codec) (Vector.fromList ['a','b']) Array [String "a",String "b"]
API Note
This is a forward-compatible version of ArrayOfCodec without a name.vectorCodec = ArrayOfCodec Nothing
vectorCodec :: ValueCodec input output -> ValueCodec (Vector input) (Vector output)autodocodec Autodocodec.Codec Vector codec Build a codec for vectors of values from a codec for a single value.
Example usage
>>> toJSONVia (vectorCodec codec) (Vector.fromList ['a','b']) Array [String "a",String "b"]
API Note
This is a forward-compatible version of ArrayOfCodec without a name.vectorCodec = ArrayOfCodec Nothing
vectorFromList :: [a] -> Array (ZeroBased Int) acomfort-array Data.Array.Comfort.Boxed No documentation available.
vectorFromList :: [a] -> Array (ZeroBased Int) acomfort-array Data.Array.Comfort.Boxed.Unchecked No documentation available.
vectorFromList :: Storable a => [a] -> Array (ZeroBased Int) acomfort-array Data.Array.Comfort.Storable No documentation available.