------------------------------------------------------------------------------
-- |
-- Module      : Data.Array.Vector
-- Copyright   : (c) [2001..2002] Manuel M T Chakravarty & Gabriele Keller
--               (c) 2006         Manuel M T Chakravarty & Roman Leshchinskiy
--               (c) 2008         Don Stewart
--
-- License     : see LICENSE
-- 
-- Maintainer  : Don Stewart
-- Portability : See .cabal file
--
--
-- The top level interface to operations on strict, non-nested, fusible arrays.
--
-- Note that the time complexities provided for functions in this package depend
-- on fusion. Thus the times given assume that fusion did not occur and that
-- the full operation is performed. In some cases fusion can take multiple /O(n)/
-- operations on UArrs and optimize them out of the generated code completely.
--
------------------------------------------------------------------------------

module Data.Array.Vector (

  -- * Array classes
  UA,

  -- (*) The pure and mutable array types
  UArr, MUArr,

  -- * Streaming pure arrays
  streamU, unstreamU,

  -- * Conversions to\/from lists
  toU, fromU,

  -- * Basic operations on pure arrays
  -- ** Introducing and eliminating UArrs
  emptyU,
  singletonU,

  -- ** Basic interface
  consU,
  snocU,
  -- uncons
  appendU,
  headU,
  lastU,
  tailU,
  initU,
  nullU,
  unitsU,
  lengthU,

  -- * Transforming UArrs
  mapU,

  -- * Reducing UArrs (folds)
  foldU,
  fold1U,
  fold1MaybeU,

  foldlU,
  foldl1U,
  foldl1MaybeU,

  -- ** Logical operations
  andU,
  orU,
  anyU,
  allU,

  -- * Arithmetic operations
  sumU, productU,
  maximumU, minimumU,
  maximumByU, minimumByU,
--  maximumIndexU, minimumIndexU,
--  maximumIndexByU, minimumIndexByU,

  -- * Building UArrs
  -- ** Scans
  scanlU,
  scanl1U,
  {-scanrU, scanr1U,-}
  scanU,
  scan1U,
  scanResU,

  -- ** Accumulating UArrs
  mapAccumLU,

  -- ** Generating UArrs
  iterateU,
  replicateU,
  replicateEachU,

  -- ** Unfolding UArrs

  unfoldU,  

  -- * Subarrays

  -- ** Breaking arrays
  sliceU,
--  extractU,
  takeU,
  dropU,
  splitAtU,
  takeWhileU,
  dropWhileU,
  {- spanU, breakU,-}

  -- * Searching Arrays

  -- ** Searching by equality
  elemU,
  notElemU,

  -- ** Searching with a predicate
  filterU,
  findU,
  findIndexU,

  -- * Indexing UArrs
  indexU,
  lookupU,

  -- * Zipping and unzipping
  zipU, zip3U,
  unzipU, unzip3U,
  zipWithU,
  zipWith3U,
  fstU,
  sndU,

  -- * Enumerations
  enumFromToU,
  enumFromToFracU,
  enumFromThenToU,
  enumFromStepLenU,
  enumFromToEachU,

{-
  -- * Low level conversions
  -- ** Copying arrays
  -- ** Packing CStrings and pointers
  -- ** Using UArrs as CStrings
  -- * I\/O with UArrs

  -- creating them, generating new arrays from old ones.
-}

------------------------------------------------------------------------

  combineU,
  packU,
  indexedU,
  repeatU,

{-
  -- * Permutations
  -- permuteU, bpermuteU, bpermuteDftU, reverseU, updateU,

  -- * Searching
  {- indexOfU,-}

  -- * Arrays of pairs
  {-crossU,-}

  -- * Random arrays
  -- randomU, randomRU,
-}

  -- * I\/O
  UIO(..),

  -- * Operations on mutable arrays
  newU, lengthMU, newMU, readMU, writeMU, unsafeFreezeMU, unsafeFreezeAllMU,
  copyMU, permuteMU, atomicUpdateMU, unstreamMU,
  memcpyMU, memcpyOffMU, memmoveOffMU,
  unsafeZipMU, unsafeUnzipMU,

  module Data.Array.Vector.Prim.Hyperstrict

  ) where

import Data.Array.Vector.UArr (
  UA, UArr, MUArr,
  newU, lengthMU, newMU, readMU, writeMU, copyMU,
  unsafeFreezeMU, unsafeFreezeAllMU)

import Data.Array.Vector.Prim.Hyperstrict
import Data.Array.Vector.UArr hiding (lengthU, indexU)

import Data.Array.Vector.Strict.Stream
import Data.Array.Vector.Strict.Basics
import Data.Array.Vector.Strict.Enum
import Data.Array.Vector.Strict.Sums
import Data.Array.Vector.Strict.Permute
import Data.Array.Vector.Strict.Text ()