|
GHC.Arr | Portability | non-portable (GHC extensions) | Stability | internal | Maintainer | cvs-ghc@haskell.org |
|
|
|
|
|
Description |
GHC's array implementation.
|
|
Synopsis |
|
class (Ord a) => Ix a where | | | indexError :: (Show a) => (a, a) -> a -> String -> b | | type IPr = (Int, Int) | | data Array i e = Array !i !i (Array# e) | | data STArray s i e = STArray !i !i (MutableArray# s e) | | arrEleBottom :: a | | array :: (Ix i) => (i, i) -> [(i, e)] -> Array i e | | unsafeArray :: (Ix i) => (i, i) -> [(Int, e)] -> Array i e | | fill :: MutableArray# s e -> (Int, e) -> STRep s a -> STRep s a | | done :: (Ix i) => i -> i -> MutableArray# s e -> STRep s (Array i e) | | listArray :: (Ix i) => (i, i) -> [e] -> Array i e | | (!) :: (Ix i) => Array i e -> i -> e | | unsafeAt :: (Ix i) => Array i e -> Int -> e | | bounds :: (Ix i) => Array i e -> (i, i) | | indices :: (Ix i) => Array i e -> [i] | | elems :: (Ix i) => Array i e -> [e] | | assocs :: (Ix i) => Array i e -> [(i, e)] | | accumArray :: (Ix i) => (e -> a -> e) -> e -> (i, i) -> [(i, a)] -> Array i e | | unsafeAccumArray :: (Ix i) => (e -> a -> e) -> e -> (i, i) -> [(Int, a)] -> Array i e | | adjust :: (e -> a -> e) -> MutableArray# s e -> (Int, a) -> STRep s b -> STRep s b | | (//) :: (Ix i) => Array i e -> [(i, e)] -> Array i e | | unsafeReplace :: (Ix i) => Array i e -> [(Int, e)] -> Array i e | | accum :: (Ix i) => (e -> a -> e) -> Array i e -> [(i, a)] -> Array i e | | unsafeAccum :: (Ix i) => (e -> a -> e) -> Array i e -> [(Int, a)] -> Array i e | | amap :: (Ix i) => (a -> b) -> Array i a -> Array i b | | ixmap :: (Ix i, Ix j) => (i, i) -> (i -> j) -> Array j e -> Array i e | | eqArray :: (Ix i, Eq e) => Array i e -> Array i e -> Bool | | cmpArray :: (Ix i, Ord e) => Array i e -> Array i e -> Ordering | | cmpIntArray :: (Ord e) => Array Int e -> Array Int e -> Ordering | | newSTArray :: (Ix i) => (i, i) -> e -> ST s (STArray s i e) | | boundsSTArray :: STArray s i e -> (i, i) | | readSTArray :: (Ix i) => STArray s i e -> i -> ST s e | | unsafeReadSTArray :: (Ix i) => STArray s i e -> Int -> ST s e | | writeSTArray :: (Ix i) => STArray s i e -> i -> e -> ST s () | | unsafeWriteSTArray :: (Ix i) => STArray s i e -> Int -> e -> ST s () | | freezeSTArray :: (Ix i) => STArray s i e -> ST s (Array i e) | | unsafeFreezeSTArray :: (Ix i) => STArray s i e -> ST s (Array i e) | | thawSTArray :: (Ix i) => Array i e -> ST s (STArray s i e) | | unsafeThawSTArray :: (Ix i) => Array i e -> ST s (STArray s i e) |
|
|
Documentation |
|
class (Ord a) => Ix a where |
| Methods | range :: (a, a) -> [a] | | index :: (a, a) -> a -> Int | | unsafeIndex :: (a, a) -> a -> Int | | inRange :: (a, a) -> a -> Bool | | rangeSize :: (a, a) -> Int | | unsafeRangeSize :: (a, a) -> Int |
| | Instances | Ix Char | Ix Int | Ix Integer | Ix Bool | Ix Ordering | Ix () | (Ix a, Ix b) => Ix (a, b) | (Ix a1, Ix a2, Ix a3) => Ix (a1, a2, a3) | (Ix a1, Ix a2, Ix a3, Ix a4) => Ix (a1, a2, a3, a4) | (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5) => Ix (a1, a2, a3, a4, a5) | Ix Int8 | Ix Int16 | Ix Int32 | Ix Int64 | Ix Word | Ix Word8 | Ix Word16 | Ix Word32 | Ix Word64 |
|
|
|
indexError :: (Show a) => (a, a) -> a -> String -> b |
|
type IPr = (Int, Int) |
|
data Array i e |
|
|
data STArray s i e |
Mutable, boxed, non-strict arrays in the ST monad. The type
arguments are as follows: s: the state variable argument for the ST type i: the index type of the array (should be an instance of Ix) e: the element type of the array.
| Constructors | STArray !i !i (MutableArray# s e) | |
| Instances | |
|
|
arrEleBottom :: a |
|
array :: (Ix i) => (i, i) -> [(i, e)] -> Array i e |
|
unsafeArray :: (Ix i) => (i, i) -> [(Int, e)] -> Array i e |
|
fill :: MutableArray# s e -> (Int, e) -> STRep s a -> STRep s a |
|
done :: (Ix i) => i -> i -> MutableArray# s e -> STRep s (Array i e) |
|
listArray :: (Ix i) => (i, i) -> [e] -> Array i e |
|
(!) :: (Ix i) => Array i e -> i -> e |
|
unsafeAt :: (Ix i) => Array i e -> Int -> e |
|
bounds :: (Ix i) => Array i e -> (i, i) |
|
indices :: (Ix i) => Array i e -> [i] |
|
elems :: (Ix i) => Array i e -> [e] |
|
assocs :: (Ix i) => Array i e -> [(i, e)] |
|
accumArray :: (Ix i) => (e -> a -> e) -> e -> (i, i) -> [(i, a)] -> Array i e |
|
unsafeAccumArray :: (Ix i) => (e -> a -> e) -> e -> (i, i) -> [(Int, a)] -> Array i e |
|
adjust :: (e -> a -> e) -> MutableArray# s e -> (Int, a) -> STRep s b -> STRep s b |
|
(//) :: (Ix i) => Array i e -> [(i, e)] -> Array i e |
|
unsafeReplace :: (Ix i) => Array i e -> [(Int, e)] -> Array i e |
|
accum :: (Ix i) => (e -> a -> e) -> Array i e -> [(i, a)] -> Array i e |
|
unsafeAccum :: (Ix i) => (e -> a -> e) -> Array i e -> [(Int, a)] -> Array i e |
|
amap :: (Ix i) => (a -> b) -> Array i a -> Array i b |
|
ixmap :: (Ix i, Ix j) => (i, i) -> (i -> j) -> Array j e -> Array i e |
|
eqArray :: (Ix i, Eq e) => Array i e -> Array i e -> Bool |
|
cmpArray :: (Ix i, Ord e) => Array i e -> Array i e -> Ordering |
|
cmpIntArray :: (Ord e) => Array Int e -> Array Int e -> Ordering |
|
newSTArray :: (Ix i) => (i, i) -> e -> ST s (STArray s i e) |
|
boundsSTArray :: STArray s i e -> (i, i) |
|
readSTArray :: (Ix i) => STArray s i e -> i -> ST s e |
|
unsafeReadSTArray :: (Ix i) => STArray s i e -> Int -> ST s e |
|
writeSTArray :: (Ix i) => STArray s i e -> i -> e -> ST s () |
|
unsafeWriteSTArray :: (Ix i) => STArray s i e -> Int -> e -> ST s () |
|
freezeSTArray :: (Ix i) => STArray s i e -> ST s (Array i e) |
|
unsafeFreezeSTArray :: (Ix i) => STArray s i e -> ST s (Array i e) |
|
thawSTArray :: (Ix i) => Array i e -> ST s (STArray s i e) |
|
unsafeThawSTArray :: (Ix i) => Array i e -> ST s (STArray s i e) |
|
Produced by Haddock version 0.4 |