Safe Haskell | None |
---|---|
Language | Haskell98 |
- data MVector :: * -> * -> * where
- mboxed :: MVector s a -> MVector s a
- munboxed :: Unbox a => MVector s a -> MVector s a
- data Vector :: * -> * where
- boxed :: Vector a -> Vector a
- unboxed :: Unbox a => Vector a -> Vector a
- class (Typeable mv, Typeable v, mv ~ Mutable v, MVector mv a, Vector v a) => Mixed mv v a | mv -> v, v -> mv where
Documentation
data MVector :: * -> * -> * where Source
A MVector s a
is mutable vector that could have any vector type underneath
data Vector :: * -> * where Source
Alternative Vector | |
Monad Vector | |
Functor Vector | |
MonadPlus Vector | |
Applicative Vector | |
Foldable Vector | |
Traversable Vector | |
Vector Vector a | |
Mixed MVector Vector a | |
Eq a => Eq (Vector a) | |
Data a => Data (Vector a) | |
Ord a => Ord (Vector a) | |
Read a => Read (Vector a) | |
Show a => Show (Vector a) | |
Monoid (Vector a) | |
Typeable (* -> *) Vector | |
type Mutable Vector = MVector |
class (Typeable mv, Typeable v, mv ~ Mutable v, MVector mv a, Vector v a) => Mixed mv v a | mv -> v, v -> mv where Source
Vector doesn't provide a way to recover the type of the immutable vector from the mutable vector type
This would otherwise prevent us from finishing the implementation of basicUnsafeFreeze
in Vector
This class captures the invariants necessary to hide
the choice of vector type from the user in such
a way that we can go from mutable vector to immutabl vector and back again.
Nothing