sdp-0.2: Simple Data Processing
Copyright(c) Andrey Mulik 2019
LicenseBSD-style
Maintainerwork.a.mulik@gmail.com
Portabilitynon-portable (GHC extensions)
Safe HaskellTrustworthy
LanguageHaskell2010

SDP.Prim.SArray

Description

SDP.Prim.SArray provides lazy boxed array pseudo-primitive types SArray#, STArray# and IOArray#.

Synopsis

Exports

module SDP.SortM

module SDP.Sort

Pseudo-primitive types

newtype MIOArray# (io :: Type -> Type) e Source #

MIOArray# is mutable preudo-primitive Int-indexed lazy boxed array.

Constructors

MIOArray# (STArray# RealWorld e) 

Instances

Instances details
MonadIO io => Thaw io (SArray# e) (MIOArray# io e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

thaw :: SArray# e -> io (MIOArray# io e) Source #

unsafeThaw :: SArray# e -> io (MIOArray# io e) Source #

MonadIO io => SortM io (MIOArray# io e) e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

sortedMBy :: (e -> e -> Bool) -> MIOArray# io e -> io Bool Source #

sortMBy :: Compare e -> MIOArray# io e -> io () Source #

MonadIO io => SplitM io (MIOArray# io e) e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

takeM :: Int -> MIOArray# io e -> io (MIOArray# io e) Source #

dropM :: Int -> MIOArray# io e -> io (MIOArray# io e) Source #

keepM :: Int -> MIOArray# io e -> io (MIOArray# io e) Source #

sansM :: Int -> MIOArray# io e -> io (MIOArray# io e) Source #

splitM :: Int -> MIOArray# io e -> io (MIOArray# io e, MIOArray# io e) Source #

divideM :: Int -> MIOArray# io e -> io (MIOArray# io e, MIOArray# io e) Source #

splitsM :: Foldable f => f Int -> MIOArray# io e -> io [MIOArray# io e] Source #

dividesM :: Foldable f => f Int -> MIOArray# io e -> io [MIOArray# io e] Source #

partsM :: Foldable f => f Int -> MIOArray# io e -> io [MIOArray# io e] Source #

chunksM :: Int -> MIOArray# io e -> io [MIOArray# io e] Source #

eachM :: Int -> MIOArray# io e -> io (MIOArray# io e) Source #

prefixM :: (e -> Bool) -> MIOArray# io e -> io Int Source #

suffixM :: (e -> Bool) -> MIOArray# io e -> io Int Source #

mprefix :: (e -> io Bool) -> MIOArray# io e -> io Int Source #

msuffix :: (e -> io Bool) -> MIOArray# io e -> io Int Source #

MonadIO io => LinearM io (MIOArray# io e) e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

newNull :: io (MIOArray# io e) Source #

nowNull :: MIOArray# io e -> io Bool Source #

singleM :: e -> io (MIOArray# io e) Source #

getHead :: MIOArray# io e -> io e Source #

getLast :: MIOArray# io e -> io e Source #

prepend :: e -> MIOArray# io e -> io (MIOArray# io e) Source #

append :: MIOArray# io e -> e -> io (MIOArray# io e) Source #

newLinear :: [e] -> io (MIOArray# io e) Source #

newLinearN :: Int -> [e] -> io (MIOArray# io e) Source #

fromFoldableM :: Foldable f => f e -> io (MIOArray# io e) Source #

getLeft :: MIOArray# io e -> io [e] Source #

getRight :: MIOArray# io e -> io [e] Source #

(!#>) :: MIOArray# io e -> Int -> io e Source #

writeM :: MIOArray# io e -> Int -> e -> io () Source #

copied :: MIOArray# io e -> io (MIOArray# io e) Source #

copied' :: MIOArray# io e -> Int -> Int -> io (MIOArray# io e) Source #

reversed :: MIOArray# io e -> io (MIOArray# io e) Source #

merged :: Foldable f => f (MIOArray# io e) -> io (MIOArray# io e) Source #

filled :: Int -> e -> io (MIOArray# io e) Source #

copyTo :: MIOArray# io e -> Int -> MIOArray# io e -> Int -> Int -> io () Source #

ofoldrM :: (Int -> e -> r -> io r) -> r -> MIOArray# io e -> io r Source #

ofoldlM :: (Int -> r -> e -> io r) -> r -> MIOArray# io e -> io r Source #

ofoldrM' :: (Int -> e -> r -> io r) -> r -> MIOArray# io e -> io r Source #

ofoldlM' :: (Int -> r -> e -> io r) -> r -> MIOArray# io e -> io r Source #

foldrM :: (e -> r -> io r) -> r -> MIOArray# io e -> io r Source #

foldlM :: (r -> e -> io r) -> r -> MIOArray# io e -> io r Source #

foldrM' :: (e -> r -> io r) -> r -> MIOArray# io e -> io r Source #

foldlM' :: (r -> e -> io r) -> r -> MIOArray# io e -> io r Source #

swapM :: MIOArray# io e -> Int -> Int -> io () Source #

MonadIO io => BorderedM io (MIOArray# io e) Int Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

getBounds :: MIOArray# io e -> io (Int, Int) Source #

getLower :: MIOArray# io e -> io Int Source #

getUpper :: MIOArray# io e -> io Int Source #

getSizeOf :: MIOArray# io e -> io Int Source #

getSizesOf :: MIOArray# io e -> io [Int] Source #

nowIndexIn :: MIOArray# io e -> Int -> io Bool Source #

getOffsetOf :: MIOArray# io e -> Int -> io Int Source #

getIndexOf :: MIOArray# io e -> Int -> io Int Source #

getIndices :: MIOArray# io e -> io [Int] Source #

MonadIO io => MapM io (MIOArray# io e) Int e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

newMap :: [(Int, e)] -> io (MIOArray# io e) Source #

newMap' :: e -> [(Int, e)] -> io (MIOArray# io e) Source #

getAssocs :: MIOArray# io e -> io [(Int, e)] Source #

(>!) :: MIOArray# io e -> Int -> io e Source #

(!>) :: MIOArray# io e -> Int -> io e Source #

(!?>) :: MIOArray# io e -> Int -> io (Maybe e) Source #

updateM :: MIOArray# io e -> (Int -> e -> e) -> io (MIOArray# io e) Source #

overwrite :: MIOArray# io e -> [(Int, e)] -> io (MIOArray# io e) Source #

memberM' :: MIOArray# io e -> Int -> io Bool Source #

getKeys :: MIOArray# io e -> io [Int] Source #

(.?) :: (e -> Bool) -> MIOArray# io e -> io (Maybe Int) Source #

(*?) :: (e -> Bool) -> MIOArray# io e -> io [Int] Source #

kfoldrM :: (Int -> e -> acc -> io acc) -> acc -> MIOArray# io e -> io acc Source #

kfoldlM :: (Int -> acc -> e -> io acc) -> acc -> MIOArray# io e -> io acc Source #

kfoldrM' :: (Int -> e -> acc -> io acc) -> acc -> MIOArray# io e -> io acc Source #

kfoldlM' :: (Int -> acc -> e -> io acc) -> acc -> MIOArray# io e -> io acc Source #

MonadIO io => IndexedM io (MIOArray# io e) Int e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

fromAssocs :: (Int, Int) -> [(Int, e)] -> io (MIOArray# io e) Source #

fromAssocs' :: (Int, Int) -> e -> [(Int, e)] -> io (MIOArray# io e) Source #

writeM' :: MIOArray# io e -> Int -> e -> io () Source #

swapM' :: MIOArray# io e -> Int -> Int -> io () Source #

fromIndexed' :: Indexed v' j e => v' -> io (MIOArray# io e) Source #

fromIndexedM :: IndexedM io v' j e => v' -> io (MIOArray# io e) Source #

reshaped :: IndexedM io v' j e => (Int, Int) -> v' -> (Int -> j) -> io (MIOArray# io e) Source #

fromAccum :: (e -> e' -> e) -> MIOArray# io e -> [(Int, e')] -> io (MIOArray# io e) Source #

updateM' :: MIOArray# io e -> (e -> e) -> Int -> io () Source #

MonadIO io => Freeze io (MIOArray# io e) (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

freeze :: MIOArray# io e -> io (SArray# e) Source #

unsafeFreeze :: MIOArray# io e -> io (SArray# e) Source #

Eq (MIOArray# io e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

(==) :: MIOArray# io e -> MIOArray# io e -> Bool #

(/=) :: MIOArray# io e -> MIOArray# io e -> Bool #

Estimate (MIOArray# io e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

(<.=>) :: MIOArray# io e -> Int -> Ordering Source #

(<==>) :: Compare (MIOArray# io e) Source #

(.==) :: MIOArray# io e -> Int -> Bool Source #

(./=) :: MIOArray# io e -> Int -> Bool Source #

(.<=) :: MIOArray# io e -> Int -> Bool Source #

(.>=) :: MIOArray# io e -> Int -> Bool Source #

(.<) :: MIOArray# io e -> Int -> Bool Source #

(.>) :: MIOArray# io e -> Int -> Bool Source #

(.<.) :: MIOArray# io e -> MIOArray# io e -> Bool Source #

(.>.) :: MIOArray# io e -> MIOArray# io e -> Bool Source #

(.<=.) :: MIOArray# io e -> MIOArray# io e -> Bool Source #

(.>=.) :: MIOArray# io e -> MIOArray# io e -> Bool Source #

(.==.) :: MIOArray# io e -> MIOArray# io e -> Bool Source #

(./=.) :: MIOArray# io e -> MIOArray# io e -> Bool Source #

Bordered (MIOArray# io e) Int Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

bounds :: MIOArray# io e -> (Int, Int) Source #

lower :: MIOArray# io e -> Int Source #

upper :: MIOArray# io e -> Int Source #

sizeOf :: MIOArray# io e -> Int Source #

sizesOf :: MIOArray# io e -> [Int] Source #

indexIn :: MIOArray# io e -> Int -> Bool Source #

indices :: MIOArray# io e -> [Int] Source #

indexOf :: MIOArray# io e -> Int -> Int Source #

offsetOf :: MIOArray# io e -> Int -> Int Source #

type IOArray# = MIOArray# IO Source #

IOArray# is mutable preudo-primitive Int-indexed lazy boxed array.

data STArray# s e Source #

STArray# is mutable preudo-primitive Int-indexed lazy boxed array type.

Instances

Instances details
Thaw (ST s) (SArray# e) (STArray# s e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

thaw :: SArray# e -> ST s (STArray# s e) Source #

unsafeThaw :: SArray# e -> ST s (STArray# s e) Source #

SortM (ST s) (STArray# s e) e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

sortedMBy :: (e -> e -> Bool) -> STArray# s e -> ST s Bool Source #

sortMBy :: Compare e -> STArray# s e -> ST s () Source #

SplitM (ST s) (STArray# s e) e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

takeM :: Int -> STArray# s e -> ST s (STArray# s e) Source #

dropM :: Int -> STArray# s e -> ST s (STArray# s e) Source #

keepM :: Int -> STArray# s e -> ST s (STArray# s e) Source #

sansM :: Int -> STArray# s e -> ST s (STArray# s e) Source #

splitM :: Int -> STArray# s e -> ST s (STArray# s e, STArray# s e) Source #

divideM :: Int -> STArray# s e -> ST s (STArray# s e, STArray# s e) Source #

splitsM :: Foldable f => f Int -> STArray# s e -> ST s [STArray# s e] Source #

dividesM :: Foldable f => f Int -> STArray# s e -> ST s [STArray# s e] Source #

partsM :: Foldable f => f Int -> STArray# s e -> ST s [STArray# s e] Source #

chunksM :: Int -> STArray# s e -> ST s [STArray# s e] Source #

eachM :: Int -> STArray# s e -> ST s (STArray# s e) Source #

prefixM :: (e -> Bool) -> STArray# s e -> ST s Int Source #

suffixM :: (e -> Bool) -> STArray# s e -> ST s Int Source #

mprefix :: (e -> ST s Bool) -> STArray# s e -> ST s Int Source #

msuffix :: (e -> ST s Bool) -> STArray# s e -> ST s Int Source #

LinearM (ST s) (STArray# s e) e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

newNull :: ST s (STArray# s e) Source #

nowNull :: STArray# s e -> ST s Bool Source #

singleM :: e -> ST s (STArray# s e) Source #

getHead :: STArray# s e -> ST s e Source #

getLast :: STArray# s e -> ST s e Source #

prepend :: e -> STArray# s e -> ST s (STArray# s e) Source #

append :: STArray# s e -> e -> ST s (STArray# s e) Source #

newLinear :: [e] -> ST s (STArray# s e) Source #

newLinearN :: Int -> [e] -> ST s (STArray# s e) Source #

fromFoldableM :: Foldable f => f e -> ST s (STArray# s e) Source #

getLeft :: STArray# s e -> ST s [e] Source #

getRight :: STArray# s e -> ST s [e] Source #

(!#>) :: STArray# s e -> Int -> ST s e Source #

writeM :: STArray# s e -> Int -> e -> ST s () Source #

copied :: STArray# s e -> ST s (STArray# s e) Source #

copied' :: STArray# s e -> Int -> Int -> ST s (STArray# s e) Source #

reversed :: STArray# s e -> ST s (STArray# s e) Source #

merged :: Foldable f => f (STArray# s e) -> ST s (STArray# s e) Source #

filled :: Int -> e -> ST s (STArray# s e) Source #

copyTo :: STArray# s e -> Int -> STArray# s e -> Int -> Int -> ST s () Source #

ofoldrM :: (Int -> e -> r -> ST s r) -> r -> STArray# s e -> ST s r Source #

ofoldlM :: (Int -> r -> e -> ST s r) -> r -> STArray# s e -> ST s r Source #

ofoldrM' :: (Int -> e -> r -> ST s r) -> r -> STArray# s e -> ST s r Source #

ofoldlM' :: (Int -> r -> e -> ST s r) -> r -> STArray# s e -> ST s r Source #

foldrM :: (e -> r -> ST s r) -> r -> STArray# s e -> ST s r Source #

foldlM :: (r -> e -> ST s r) -> r -> STArray# s e -> ST s r Source #

foldrM' :: (e -> r -> ST s r) -> r -> STArray# s e -> ST s r Source #

foldlM' :: (r -> e -> ST s r) -> r -> STArray# s e -> ST s r Source #

swapM :: STArray# s e -> Int -> Int -> ST s () Source #

BorderedM (ST s) (STArray# s e) Int Source # 
Instance details

Defined in SDP.Prim.SArray

MapM (ST s) (STArray# s e) Int e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

newMap :: [(Int, e)] -> ST s (STArray# s e) Source #

newMap' :: e -> [(Int, e)] -> ST s (STArray# s e) Source #

getAssocs :: STArray# s e -> ST s [(Int, e)] Source #

(>!) :: STArray# s e -> Int -> ST s e Source #

(!>) :: STArray# s e -> Int -> ST s e Source #

(!?>) :: STArray# s e -> Int -> ST s (Maybe e) Source #

updateM :: STArray# s e -> (Int -> e -> e) -> ST s (STArray# s e) Source #

overwrite :: STArray# s e -> [(Int, e)] -> ST s (STArray# s e) Source #

memberM' :: STArray# s e -> Int -> ST s Bool Source #

getKeys :: STArray# s e -> ST s [Int] Source #

(.?) :: (e -> Bool) -> STArray# s e -> ST s (Maybe Int) Source #

(*?) :: (e -> Bool) -> STArray# s e -> ST s [Int] Source #

kfoldrM :: (Int -> e -> acc -> ST s acc) -> acc -> STArray# s e -> ST s acc Source #

kfoldlM :: (Int -> acc -> e -> ST s acc) -> acc -> STArray# s e -> ST s acc Source #

kfoldrM' :: (Int -> e -> acc -> ST s acc) -> acc -> STArray# s e -> ST s acc Source #

kfoldlM' :: (Int -> acc -> e -> ST s acc) -> acc -> STArray# s e -> ST s acc Source #

IndexedM (ST s) (STArray# s e) Int e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

fromAssocs :: (Int, Int) -> [(Int, e)] -> ST s (STArray# s e) Source #

fromAssocs' :: (Int, Int) -> e -> [(Int, e)] -> ST s (STArray# s e) Source #

writeM' :: STArray# s e -> Int -> e -> ST s () Source #

swapM' :: STArray# s e -> Int -> Int -> ST s () Source #

fromIndexed' :: Indexed v' j e => v' -> ST s (STArray# s e) Source #

fromIndexedM :: IndexedM (ST s) v' j e => v' -> ST s (STArray# s e) Source #

reshaped :: IndexedM (ST s) v' j e => (Int, Int) -> v' -> (Int -> j) -> ST s (STArray# s e) Source #

fromAccum :: (e -> e' -> e) -> STArray# s e -> [(Int, e')] -> ST s (STArray# s e) Source #

updateM' :: STArray# s e -> (e -> e) -> Int -> ST s () Source #

Freeze (ST s) (STArray# s e) (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

freeze :: STArray# s e -> ST s (SArray# e) Source #

unsafeFreeze :: STArray# s e -> ST s (SArray# e) Source #

Eq (STArray# s e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

(==) :: STArray# s e -> STArray# s e -> Bool #

(/=) :: STArray# s e -> STArray# s e -> Bool #

Estimate (STArray# s e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

(<.=>) :: STArray# s e -> Int -> Ordering Source #

(<==>) :: Compare (STArray# s e) Source #

(.==) :: STArray# s e -> Int -> Bool Source #

(./=) :: STArray# s e -> Int -> Bool Source #

(.<=) :: STArray# s e -> Int -> Bool Source #

(.>=) :: STArray# s e -> Int -> Bool Source #

(.<) :: STArray# s e -> Int -> Bool Source #

(.>) :: STArray# s e -> Int -> Bool Source #

(.<.) :: STArray# s e -> STArray# s e -> Bool Source #

(.>.) :: STArray# s e -> STArray# s e -> Bool Source #

(.<=.) :: STArray# s e -> STArray# s e -> Bool Source #

(.>=.) :: STArray# s e -> STArray# s e -> Bool Source #

(.==.) :: STArray# s e -> STArray# s e -> Bool Source #

(./=.) :: STArray# s e -> STArray# s e -> Bool Source #

Bordered (STArray# s e) Int Source # 
Instance details

Defined in SDP.Prim.SArray

data SArray# e Source #

SArray# is immutable pseudo-primitive Int-indexed lazy boxed array type.

SArray# isn't real Haskell primitive (like GHC.Exts types) but for reliability and stability, I made it inaccessible to direct work.

Instances

Instances details
Functor SArray# Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

fmap :: (a -> b) -> SArray# a -> SArray# b #

(<$) :: a -> SArray# b -> SArray# a #

Applicative SArray# Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

pure :: a -> SArray# a #

(<*>) :: SArray# (a -> b) -> SArray# a -> SArray# b #

liftA2 :: (a -> b -> c) -> SArray# a -> SArray# b -> SArray# c #

(*>) :: SArray# a -> SArray# b -> SArray# b #

(<*) :: SArray# a -> SArray# b -> SArray# a #

Foldable SArray# Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

fold :: Monoid m => SArray# m -> m #

foldMap :: Monoid m => (a -> m) -> SArray# a -> m #

foldMap' :: Monoid m => (a -> m) -> SArray# a -> m #

foldr :: (a -> b -> b) -> b -> SArray# a -> b #

foldr' :: (a -> b -> b) -> b -> SArray# a -> b #

foldl :: (b -> a -> b) -> b -> SArray# a -> b #

foldl' :: (b -> a -> b) -> b -> SArray# a -> b #

foldr1 :: (a -> a -> a) -> SArray# a -> a #

foldl1 :: (a -> a -> a) -> SArray# a -> a #

toList :: SArray# a -> [a] #

null :: SArray# a -> Bool #

length :: SArray# a -> Int #

elem :: Eq a => a -> SArray# a -> Bool #

maximum :: Ord a => SArray# a -> a #

minimum :: Ord a => SArray# a -> a #

sum :: Num a => SArray# a -> a #

product :: Num a => SArray# a -> a #

Traversable SArray# Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

traverse :: Applicative f => (a -> f b) -> SArray# a -> f (SArray# b) #

sequenceA :: Applicative f => SArray# (f a) -> f (SArray# a) #

mapM :: Monad m => (a -> m b) -> SArray# a -> m (SArray# b) #

sequence :: Monad m => SArray# (m a) -> m (SArray# a) #

Eq1 SArray# Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

liftEq :: (a -> b -> Bool) -> SArray# a -> SArray# b -> Bool #

Eq1 Unlist Source # 
Instance details

Defined in SDP.Unrolled.Unlist

Methods

liftEq :: (a -> b -> Bool) -> Unlist a -> Unlist b -> Bool #

Ord1 SArray# Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

liftCompare :: (a -> b -> Ordering) -> SArray# a -> SArray# b -> Ordering #

Ord1 Unlist Source # 
Instance details

Defined in SDP.Unrolled.Unlist

Methods

liftCompare :: (a -> b -> Ordering) -> Unlist a -> Unlist b -> Ordering #

Zip SArray# Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

zap :: SArray# (a -> b) -> SArray# a -> SArray# b Source #

all2 :: (a -> b -> Bool) -> SArray# a -> SArray# b -> Bool Source #

all3 :: (a -> b -> c -> Bool) -> SArray# a -> SArray# b -> SArray# c -> Bool Source #

all4 :: (a -> b -> c -> d -> Bool) -> SArray# a -> SArray# b -> SArray# c -> SArray# d -> Bool Source #

all5 :: (a -> b -> c -> d -> e -> Bool) -> SArray# a -> SArray# b -> SArray# c -> SArray# d -> SArray# e -> Bool Source #

all6 :: (a -> b -> c -> d -> e -> f -> Bool) -> SArray# a -> SArray# b -> SArray# c -> SArray# d -> SArray# e -> SArray# f -> Bool Source #

any2 :: (a -> b -> Bool) -> SArray# a -> SArray# b -> Bool Source #

any3 :: (a -> b -> c -> Bool) -> SArray# a -> SArray# b -> SArray# c -> Bool Source #

any4 :: (a -> b -> c -> d -> Bool) -> SArray# a -> SArray# b -> SArray# c -> SArray# d -> Bool Source #

any5 :: (a -> b -> c -> d -> e -> Bool) -> SArray# a -> SArray# b -> SArray# c -> SArray# d -> SArray# e -> Bool Source #

any6 :: (a -> b -> c -> d -> e -> f -> Bool) -> SArray# a -> SArray# b -> SArray# c -> SArray# d -> SArray# e -> SArray# f -> Bool Source #

zip :: SArray# a -> SArray# b -> SArray# (a, b) Source #

zip3 :: SArray# a -> SArray# b -> SArray# c -> SArray# (a, b, c) Source #

zip4 :: SArray# a -> SArray# b -> SArray# c -> SArray# d -> SArray# (a, b, c, d) Source #

zip5 :: SArray# a -> SArray# b -> SArray# c -> SArray# d -> SArray# e -> SArray# (a, b, c, d, e) Source #

zip6 :: SArray# a -> SArray# b -> SArray# c -> SArray# d -> SArray# e -> SArray# f -> SArray# (a, b, c, d, e, f) Source #

zipWith :: (a -> b -> c) -> SArray# a -> SArray# b -> SArray# c Source #

zipWith3 :: (a -> b -> c -> d) -> SArray# a -> SArray# b -> SArray# c -> SArray# d Source #

zipWith4 :: (a -> b -> c -> d -> e) -> SArray# a -> SArray# b -> SArray# c -> SArray# d -> SArray# e Source #

zipWith5 :: (a -> b -> c -> d -> e -> f) -> SArray# a -> SArray# b -> SArray# c -> SArray# d -> SArray# e -> SArray# f Source #

zipWith6 :: (a -> b -> c -> d -> e -> f -> g) -> SArray# a -> SArray# b -> SArray# c -> SArray# d -> SArray# e -> SArray# f -> SArray# g Source #

Zip Unlist Source # 
Instance details

Defined in SDP.Unrolled.Unlist

Methods

zap :: Unlist (a -> b) -> Unlist a -> Unlist b Source #

all2 :: (a -> b -> Bool) -> Unlist a -> Unlist b -> Bool Source #

all3 :: (a -> b -> c -> Bool) -> Unlist a -> Unlist b -> Unlist c -> Bool Source #

all4 :: (a -> b -> c -> d -> Bool) -> Unlist a -> Unlist b -> Unlist c -> Unlist d -> Bool Source #

all5 :: (a -> b -> c -> d -> e -> Bool) -> Unlist a -> Unlist b -> Unlist c -> Unlist d -> Unlist e -> Bool Source #

all6 :: (a -> b -> c -> d -> e -> f -> Bool) -> Unlist a -> Unlist b -> Unlist c -> Unlist d -> Unlist e -> Unlist f -> Bool Source #

any2 :: (a -> b -> Bool) -> Unlist a -> Unlist b -> Bool Source #

any3 :: (a -> b -> c -> Bool) -> Unlist a -> Unlist b -> Unlist c -> Bool Source #

any4 :: (a -> b -> c -> d -> Bool) -> Unlist a -> Unlist b -> Unlist c -> Unlist d -> Bool Source #

any5 :: (a -> b -> c -> d -> e -> Bool) -> Unlist a -> Unlist b -> Unlist c -> Unlist d -> Unlist e -> Bool Source #

any6 :: (a -> b -> c -> d -> e -> f -> Bool) -> Unlist a -> Unlist b -> Unlist c -> Unlist d -> Unlist e -> Unlist f -> Bool Source #

zip :: Unlist a -> Unlist b -> Unlist (a, b) Source #

zip3 :: Unlist a -> Unlist b -> Unlist c -> Unlist (a, b, c) Source #

zip4 :: Unlist a -> Unlist b -> Unlist c -> Unlist d -> Unlist (a, b, c, d) Source #

zip5 :: Unlist a -> Unlist b -> Unlist c -> Unlist d -> Unlist e -> Unlist (a, b, c, d, e) Source #

zip6 :: Unlist a -> Unlist b -> Unlist c -> Unlist d -> Unlist e -> Unlist f -> Unlist (a, b, c, d, e, f) Source #

zipWith :: (a -> b -> c) -> Unlist a -> Unlist b -> Unlist c Source #

zipWith3 :: (a -> b -> c -> d) -> Unlist a -> Unlist b -> Unlist c -> Unlist d Source #

zipWith4 :: (a -> b -> c -> d -> e) -> Unlist a -> Unlist b -> Unlist c -> Unlist d -> Unlist e Source #

zipWith5 :: (a -> b -> c -> d -> e -> f) -> Unlist a -> Unlist b -> Unlist c -> Unlist d -> Unlist e -> Unlist f Source #

zipWith6 :: (a -> b -> c -> d -> e -> f -> g) -> Unlist a -> Unlist b -> Unlist c -> Unlist d -> Unlist e -> Unlist f -> Unlist g Source #

Freeze STM (TArray# e) (SArray# e) Source # 
Instance details

Defined in SDP.Prim.TArray

Thaw STM (SArray# e) (TArray# e) Source # 
Instance details

Defined in SDP.Prim.TArray

Storable e => Thaw IO (SArray# e) (Int, Ptr e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

thaw :: SArray# e -> IO (Int, Ptr e) Source #

unsafeThaw :: SArray# e -> IO (Int, Ptr e) Source #

MonadIO io => Thaw io (SArray# e) (MIOArray# io e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

thaw :: SArray# e -> io (MIOArray# io e) Source #

unsafeThaw :: SArray# e -> io (MIOArray# io e) Source #

Storable e => Freeze IO (Int, Ptr e) (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

freeze :: (Int, Ptr e) -> IO (SArray# e) Source #

unsafeFreeze :: (Int, Ptr e) -> IO (SArray# e) Source #

MonadIO io => Freeze io (MIOArray# io e) (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

freeze :: MIOArray# io e -> io (SArray# e) Source #

unsafeFreeze :: MIOArray# io e -> io (SArray# e) Source #

IsList (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Associated Types

type Item (SArray# e) #

Methods

fromList :: [Item (SArray# e)] -> SArray# e #

fromListN :: Int -> [Item (SArray# e)] -> SArray# e #

toList :: SArray# e -> [Item (SArray# e)] #

Eq e => Eq (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

(==) :: SArray# e -> SArray# e -> Bool #

(/=) :: SArray# e -> SArray# e -> Bool #

Ord e => Ord (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

compare :: SArray# e -> SArray# e -> Ordering #

(<) :: SArray# e -> SArray# e -> Bool #

(<=) :: SArray# e -> SArray# e -> Bool #

(>) :: SArray# e -> SArray# e -> Bool #

(>=) :: SArray# e -> SArray# e -> Bool #

max :: SArray# e -> SArray# e -> SArray# e #

min :: SArray# e -> SArray# e -> SArray# e #

Read e => Read (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Show e => Show (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

showsPrec :: Int -> SArray# e -> ShowS #

show :: SArray# e -> String #

showList :: [SArray# e] -> ShowS #

IsString (SArray# Char) Source # 
Instance details

Defined in SDP.Prim.SArray

Semigroup (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

(<>) :: SArray# e -> SArray# e -> SArray# e #

sconcat :: NonEmpty (SArray# e) -> SArray# e #

stimes :: Integral b => b -> SArray# e -> SArray# e #

Monoid (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

mempty :: SArray# e #

mappend :: SArray# e -> SArray# e -> SArray# e #

mconcat :: [SArray# e] -> SArray# e #

Default (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

def :: SArray# e #

Estimate (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Nullable (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Sort (SArray# e) e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

sortedBy :: (e -> e -> Bool) -> SArray# e -> Bool Source #

sortBy :: Compare e -> SArray# e -> SArray# e Source #

Sort (Unlist e) e Source # 
Instance details

Defined in SDP.Unrolled.Unlist

Methods

sortedBy :: (e -> e -> Bool) -> Unlist e -> Bool Source #

sortBy :: Compare e -> Unlist e -> Unlist e Source #

Split (SArray# e) e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

take :: Int -> SArray# e -> SArray# e Source #

drop :: Int -> SArray# e -> SArray# e Source #

keep :: Int -> SArray# e -> SArray# e Source #

sans :: Int -> SArray# e -> SArray# e Source #

save :: Int -> SArray# e -> SArray# e Source #

skip :: Int -> SArray# e -> SArray# e Source #

split :: Int -> SArray# e -> (SArray# e, SArray# e) Source #

divide :: Int -> SArray# e -> (SArray# e, SArray# e) Source #

splits :: Foldable f => f Int -> SArray# e -> [SArray# e] Source #

divides :: Foldable f => f Int -> SArray# e -> [SArray# e] Source #

parts :: Foldable f => f Int -> SArray# e -> [SArray# e] Source #

chunks :: Int -> SArray# e -> [SArray# e] Source #

splitBy :: (e -> Bool) -> SArray# e -> (SArray# e, SArray# e) Source #

divideBy :: (e -> Bool) -> SArray# e -> (SArray# e, SArray# e) Source #

splitsBy :: (e -> Bool) -> SArray# e -> [SArray# e] Source #

splitsOn :: SArray# e -> SArray# e -> [SArray# e] Source #

replaceBy :: SArray# e -> SArray# e -> SArray# e -> SArray# e Source #

removeAll :: SArray# e -> SArray# e -> SArray# e Source #

combo :: Equal e -> SArray# e -> Int Source #

justifyL :: Int -> e -> SArray# e -> SArray# e Source #

justifyR :: Int -> e -> SArray# e -> SArray# e Source #

each :: Int -> SArray# e -> SArray# e Source #

eachFrom :: Int -> Int -> SArray# e -> SArray# e Source #

isPrefixOf :: SArray# e -> SArray# e -> Bool Source #

isSuffixOf :: SArray# e -> SArray# e -> Bool Source #

isInfixOf :: SArray# e -> SArray# e -> Bool Source #

prefix :: (e -> Bool) -> SArray# e -> Int Source #

suffix :: (e -> Bool) -> SArray# e -> Int Source #

infixes :: SArray# e -> SArray# e -> [Int] Source #

dropSide :: (e -> Bool) -> SArray# e -> SArray# e Source #

takeWhile :: (e -> Bool) -> SArray# e -> SArray# e Source #

dropWhile :: (e -> Bool) -> SArray# e -> SArray# e Source #

takeEnd :: (e -> Bool) -> SArray# e -> SArray# e Source #

dropEnd :: (e -> Bool) -> SArray# e -> SArray# e Source #

spanl :: (e -> Bool) -> SArray# e -> (SArray# e, SArray# e) Source #

breakl :: (e -> Bool) -> SArray# e -> (SArray# e, SArray# e) Source #

spanr :: (e -> Bool) -> SArray# e -> (SArray# e, SArray# e) Source #

breakr :: (e -> Bool) -> SArray# e -> (SArray# e, SArray# e) Source #

selectWhile :: (e -> Maybe a) -> SArray# e -> [a] Source #

selectEnd :: (e -> Maybe a) -> SArray# e -> [a] Source #

extractWhile :: (e -> Maybe a) -> SArray# e -> ([a], SArray# e) Source #

extractEnd :: (e -> Maybe a) -> SArray# e -> (SArray# e, [a]) Source #

selectWhile' :: (t e ~ l, Split1 t a) => (e -> Maybe a) -> SArray# e -> t a Source #

selectEnd' :: (t e ~ l, Split1 t a) => (e -> Maybe a) -> SArray# e -> t a Source #

extractWhile' :: (t e ~ l, Split1 t a) => (e -> Maybe a) -> SArray# e -> (t a, SArray# e) Source #

extractEnd' :: (t e ~ l, Split1 t a) => (e -> Maybe a) -> SArray# e -> (SArray# e, t a) Source #

Linear (SArray# e) e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

uncons :: SArray# e -> (e, SArray# e) Source #

uncons' :: SArray# e -> Maybe (e, SArray# e) Source #

toHead :: e -> SArray# e -> SArray# e Source #

head :: SArray# e -> e Source #

tail :: SArray# e -> SArray# e Source #

unsnoc :: SArray# e -> (SArray# e, e) Source #

unsnoc' :: SArray# e -> Maybe (SArray# e, e) Source #

toLast :: SArray# e -> e -> SArray# e Source #

init :: SArray# e -> SArray# e Source #

last :: SArray# e -> e Source #

single :: e -> SArray# e Source #

(++) :: SArray# e -> SArray# e -> SArray# e Source #

replicate :: Int -> e -> SArray# e Source #

fromList :: [e] -> SArray# e Source #

fromListN :: Int -> [e] -> SArray# e Source #

listR :: SArray# e -> [e] Source #

listL :: SArray# e -> [e] Source #

fromFoldable :: Foldable f => f e -> SArray# e Source #

(!^) :: SArray# e -> Int -> e Source #

write :: SArray# e -> Int -> e -> SArray# e Source #

concat :: Foldable f => f (SArray# e) -> SArray# e Source #

concatMap :: Foldable f => (a -> SArray# e) -> f a -> SArray# e Source #

intersperse :: e -> SArray# e -> SArray# e Source #

filter :: (e -> Bool) -> SArray# e -> SArray# e Source #

except :: (e -> Bool) -> SArray# e -> SArray# e Source #

partition :: (e -> Bool) -> SArray# e -> (SArray# e, SArray# e) Source #

partitions :: Foldable f => f (e -> Bool) -> SArray# e -> [SArray# e] Source #

select :: (e -> Maybe a) -> SArray# e -> [a] Source #

select' :: (t e ~ SArray# e, Linear1 t a) => (e -> Maybe a) -> SArray# e -> t a Source #

extract :: (e -> Maybe a) -> SArray# e -> ([a], SArray# e) Source #

extract' :: (t e ~ SArray# e, Linear1 t a) => (e -> Maybe a) -> SArray# e -> (t a, SArray# e) Source #

selects :: Foldable f => f (e -> Maybe a) -> SArray# e -> ([[a]], SArray# e) Source #

selects' :: (Foldable f, t e ~ SArray# e, Linear1 t a) => f (e -> Maybe a) -> SArray# e -> ([t a], SArray# e) Source #

isSubseqOf :: SArray# e -> SArray# e -> Bool Source #

reverse :: SArray# e -> SArray# e Source #

force :: SArray# e -> SArray# e Source #

subsequences :: SArray# e -> [SArray# e] Source #

iterate :: Int -> (e -> e) -> e -> SArray# e Source #

nub :: SArray# e -> SArray# e Source #

nubBy :: Equal e -> SArray# e -> SArray# e Source #

ofoldr :: (Int -> e -> b -> b) -> b -> SArray# e -> b Source #

ofoldl :: (Int -> b -> e -> b) -> b -> SArray# e -> b Source #

ofoldr' :: (Int -> e -> b -> b) -> b -> SArray# e -> b Source #

ofoldl' :: (Int -> b -> e -> b) -> b -> SArray# e -> b Source #

o_foldr :: (e -> b -> b) -> b -> SArray# e -> b Source #

o_foldl :: (b -> e -> b) -> b -> SArray# e -> b Source #

o_foldr' :: (e -> b -> b) -> b -> SArray# e -> b Source #

o_foldl' :: (b -> e -> b) -> b -> SArray# e -> b Source #

Bordered (SArray# e) Int Source # 
Instance details

Defined in SDP.Prim.SArray

Ord e => Set (SArray# e) e Source # 
Instance details

Defined in SDP.Prim.SArray

SetWith (SArray# e) e Source # 
Instance details

Defined in SDP.Prim.SArray

Scan (SArray# e) e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

scanl :: (b -> e -> b) -> b -> SArray# e -> [b] Source #

scanl' :: (b -> e -> b) -> b -> SArray# e -> [b] Source #

scanr :: (e -> b -> b) -> b -> SArray# e -> [b] Source #

scanr' :: (e -> b -> b) -> b -> SArray# e -> [b] Source #

scanl1 :: (e -> e -> e) -> SArray# e -> [e] Source #

scanr1 :: (e -> e -> e) -> SArray# e -> [e] Source #

Map (SArray# e) Int e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

assocs :: SArray# e -> [(Int, e)] Source #

toMap :: [(Int, e)] -> SArray# e Source #

toMap' :: e -> [(Int, e)] -> SArray# e Source #

insert' :: Int -> e -> SArray# e -> SArray# e Source #

delete' :: Int -> SArray# e -> SArray# e Source #

member' :: Int -> SArray# e -> Bool Source #

(//) :: SArray# e -> [(Int, e)] -> SArray# e Source #

(.!) :: SArray# e -> Int -> e Source #

(!) :: SArray# e -> Int -> e Source #

(!?) :: SArray# e -> Int -> Maybe e Source #

filter' :: (Int -> e -> Bool) -> SArray# e -> SArray# e Source #

union' :: (e -> e -> e) -> SArray# e -> SArray# e -> SArray# e Source #

difference' :: (e -> e -> Maybe e) -> SArray# e -> SArray# e -> SArray# e Source #

intersection' :: (e -> e -> e) -> SArray# e -> SArray# e -> SArray# e Source #

update :: SArray# e -> (Int -> e -> e) -> SArray# e Source #

lookupLT' :: Int -> SArray# e -> Maybe (Int, e) Source #

lookupGT' :: Int -> SArray# e -> Maybe (Int, e) Source #

lookupLE' :: Int -> SArray# e -> Maybe (Int, e) Source #

lookupGE' :: Int -> SArray# e -> Maybe (Int, e) Source #

keys :: SArray# e -> [Int] Source #

(.$) :: (e -> Bool) -> SArray# e -> Maybe Int Source #

(*$) :: (e -> Bool) -> SArray# e -> [Int] Source #

kfoldr :: (Int -> e -> b -> b) -> b -> SArray# e -> b Source #

kfoldl :: (Int -> b -> e -> b) -> b -> SArray# e -> b Source #

kfoldr' :: (Int -> e -> b -> b) -> b -> SArray# e -> b Source #

kfoldl' :: (Int -> b -> e -> b) -> b -> SArray# e -> b Source #

Indexed (SArray# e) Int e Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

assoc :: (Int, Int) -> [(Int, e)] -> SArray# e Source #

assoc' :: (Int, Int) -> e -> [(Int, e)] -> SArray# e Source #

fromIndexed :: Indexed m j e => m -> SArray# e Source #

write' :: SArray# e -> Int -> e -> SArray# e Source #

accum :: (e -> e' -> e) -> SArray# e -> [(Int, e')] -> SArray# e Source #

imap :: Map m j e => (Int, Int) -> m -> (Int -> j) -> SArray# e Source #

update' :: SArray# e -> (e -> e) -> Int -> SArray# e Source #

updates' :: SArray# e -> (Int -> e -> e) -> SArray# e Source #

Thaw (ST s) (SArray# e) (STArray# s e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

thaw :: SArray# e -> ST s (STArray# s e) Source #

unsafeThaw :: SArray# e -> ST s (STArray# s e) Source #

Freeze (ST s) (STArray# s e) (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

Methods

freeze :: STArray# s e -> ST s (SArray# e) Source #

unsafeFreeze :: STArray# s e -> ST s (SArray# e) Source #

type Item (SArray# e) Source # 
Instance details

Defined in SDP.Prim.SArray

type Item (SArray# e) = e

Safe (copy) unpack

Unsafe unpack

offsetSArray# :: SArray# e -> Int# Source #

offsetSArray# returns SArray# offset in elements.

offsetSTArray# :: STArray# s e -> Int# Source #

offsetSTArray# returns STArray# offset in elements.

Unsafe pack

packSArray# :: Int -> Array# e -> SArray# e Source #

packSArray# creates new SArray# from sized Array#.

Coerce