twentyseven-0.0.0: Rubik's cube solver

Safe HaskellNone
LanguageHaskell2010

Data.Vector.Storable.Allocated

Contents

Description

An alternative to Storable where the underlying byte arrays are pinned.

Synopsis

Documentation

newtype Vector a Source

Constructors

Vector 

Fields

unV :: Vector a
 

newtype MVector s a Source

Constructors

MVector 

Fields

unMV :: MVector s a
 

callocVector :: forall a m. (PrimMonad m, Storable a) => Int -> m (MVector (PrimState m) a) Source

Mutable interface

replicate :: (PrimMonad m, Storable a) => Int -> a -> m (MVector (PrimState m) a) Source

read :: (PrimMonad m, Storable a) => MVector (PrimState m) a -> Int -> m a Source

write :: (PrimMonad m, Storable a) => MVector (PrimState m) a -> Int -> a -> m () Source

modify :: (PrimMonad m, Storable a) => MVector (PrimState m) a -> (a -> a) -> Int -> m () Source

unsafeRead :: (PrimMonad m, Storable a) => MVector (PrimState m) a -> Int -> m a Source

unsafeWrite :: (PrimMonad m, Storable a) => MVector (PrimState m) a -> Int -> a -> m () Source

unsafeModify :: (PrimMonad m, Storable a) => MVector (PrimState m) a -> (a -> a) -> Int -> m () Source

Immutable interface

(!) :: Storable a => Vector a -> Int -> a Source

generate :: Storable a => Int -> (Int -> a) -> Vector a Source

create :: Storable a => (forall s. ST s (MVector s a)) -> Vector a Source

map :: (Storable a, Storable b) => (a -> b) -> Vector a -> Vector b Source

ifilter :: Storable a => (Int -> a -> Bool) -> Vector a -> Vector a Source

fromList :: Storable a => [a] -> Vector a Source

IO

getMVector :: forall a. Storable a => Handle -> MVector RealWorld a -> IO () Source