HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulelinear-base-0.4.0Haskell2010

Data.Array.Destination.Internal

  • 1 type
  • 8 values
datadata DArray a where
#

A destination array, or DArray, is a write-only array that is filled by some computation which ultimately returns an array.

Constructors

valuereplicate :: a -> DArray a %1 -> ()
#

Fill a destination array with a constant

valuefill :: HasCallStack => a %1 -> DArray a %1 -> ()
#

fill a dest fills a singleton destination array. Caution, fill a dest will fail is dest isn't of length exactly one.

valuesplit :: Int -> DArray a %1 -> (DArray a, DArray a)
#

split n dest = (destl, destr) such as destl has length n.

split is total: if n is larger than the length of dest, then destr is empty.

valuemirror :: HasCallStack => Vector a -> (a %1 -> b) -> DArray b %1 -> ()
#

Fills the destination array with the contents of given vector.

Errors if the given vector is smaller than the destination array.

valuefromFunction :: (Int -> b) -> DArray b %1 -> ()
#

Fill a destination array using the given index-to-value function.