Safe Haskell | None |
---|---|

Language | Haskell98 |

Collections used within the Structure, currently aliases for the `Vector`

and `MVector`

types.

- type List a = Vector a
- data TempList m a
- initialNew :: Int -> ST m (TempList m a)
- new :: MonadTrans t => Int -> t (ST m) (TempList m a)
- add :: MonadTrans t => TempList s a -> a -> t (ST s) ()
- finalize :: MonadTrans t => TempList s a -> t (ST s) (Vector a)
- tempLength :: MonadTrans t1 => TempList s t -> t1 (ST s) Int
- empty :: Vector a
- last :: Vector a -> a
- singleton :: a -> Vector a
- map :: (a -> b) -> Vector a -> Vector b
- mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b)
- foldl :: (a -> b -> a) -> a -> Vector b -> a
- foldl' :: (a -> b -> a) -> a -> Vector b -> a
- foldr :: (a -> b -> b) -> b -> Vector a -> b
- foldM :: Monad m => (a -> b -> m a) -> a -> Vector b -> m a
- filter :: (a -> Bool) -> Vector a -> Vector a
- length :: Vector a -> Int
- defaultSize :: Num a => a
- residueVectorSize :: Num a => a
- chainVectorSize :: Num a => a
- toList :: Vector a -> [a]
- vimap :: (Int -> a -> b) -> Vector a -> Vector b
- (!) :: Vector a -> Int -> a
- (++) :: Vector a -> Vector a -> Vector a
- concat :: [Vector a] -> Vector a
- init :: Vector a -> Vector a
- tail :: Vector a -> Vector a
- head :: Vector a -> a

# Documentation

initialNew :: Int -> ST m (TempList m a) Source

Allocate initial space for a new mutable vector.

add :: MonadTrans t => TempList s a -> a -> t (ST s) () Source

Appends an element to a mutable vector.

finalize :: MonadTrans t => TempList s a -> t (ST s) (Vector a) Source

Finalizes a mutable vector, and returns immutable vector. [Does it shrink allocated space?]

tempLength :: MonadTrans t1 => TempList s t -> t1 (ST s) Int Source

Length of mutable vector.

defaultSize :: Num a => a Source

Default initial size of a mutable vector for structure contents.

residueVectorSize :: Num a => a Source

Default initial size of a mutable vector for residue contents.

chainVectorSize :: Num a => a Source

Default initial size of a mutable vector for chain contents.