Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > c95396d39d65e8386d499c597a7865c8 > files > 137

ghc-vector-devel-0.9.1-8.fc18.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.Vector.Unboxed.Mutable</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-Vector-Unboxed-Mutable.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Vector-Unboxed-Mutable.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">vector-0.9.1: Efficient Arrays</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Roman Leshchinskiy &lt;rl@cse.unsw.edu.au&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">Data.Vector.Unboxed.Mutable</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Mutable vectors of primitive types
</a></li><li><a href="#g:2">Accessors
</a><ul><li><a href="#g:3">Length information
</a></li><li><a href="#g:4">Extracting subvectors
</a></li><li><a href="#g:5">Overlapping
</a></li></ul></li><li><a href="#g:6">Construction
</a><ul><li><a href="#g:7">Initialisation
</a></li><li><a href="#g:8">Growing
</a></li><li><a href="#g:9">Restricting memory usage
</a></li></ul></li><li><a href="#g:10">Zipping and unzipping
</a></li><li><a href="#g:11">Accessing individual elements
</a></li><li><a href="#g:12">Modifying vectors
</a><ul><li><a href="#g:13">Filling and copying
</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Mutable adaptive unboxed vectors
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data family</span> <a href="#t:MVector">MVector</a> s a </li><li class="src short"><span class="keyword">type</span> <a href="#t:IOVector">IOVector</a> = <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad-ST-Safe.html#t:RealWorld">RealWorld</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:STVector">STVector</a> s = <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s</li><li class="src short"><span class="keyword">class</span> (<a href="Data-Vector-Generic.html#t:Vector">Vector</a> <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Generic-Mutable.html#t:MVector">MVector</a> <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> a) =&gt; <a href="#t:Unbox">Unbox</a> a </li><li class="src short"><a href="#v:length">length</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:null">null</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:slice">slice</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a</li><li class="src short"><a href="#v:init">init</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a</li><li class="src short"><a href="#v:tail">tail</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a</li><li class="src short"><a href="#v:take">take</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a</li><li class="src short"><a href="#v:drop">drop</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a</li><li class="src short"><a href="#v:splitAt">splitAt</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a)</li><li class="src short"><a href="#v:unsafeSlice">unsafeSlice</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a</li><li class="src short"><a href="#v:unsafeInit">unsafeInit</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a</li><li class="src short"><a href="#v:unsafeTail">unsafeTail</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a</li><li class="src short"><a href="#v:unsafeTake">unsafeTake</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a</li><li class="src short"><a href="#v:unsafeDrop">unsafeDrop</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a</li><li class="src short"><a href="#v:overlaps">overlaps</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:new">new</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)</li><li class="src short"><a href="#v:unsafeNew">unsafeNew</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)</li><li class="src short"><a href="#v:replicate">replicate</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)</li><li class="src short"><a href="#v:replicateM">replicateM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)</li><li class="src short"><a href="#v:clone">clone</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)</li><li class="src short"><a href="#v:grow">grow</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)</li><li class="src short"><a href="#v:unsafeGrow">unsafeGrow</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)</li><li class="src short"><a href="#v:clear">clear</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:zip">zip</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b)</li><li class="src short"><a href="#v:zip3">zip3</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c)</li><li class="src short"><a href="#v:zip4">zip4</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s d -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c, d)</li><li class="src short"><a href="#v:zip5">zip5</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> e) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s d -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s e -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c, d, e)</li><li class="src short"><a href="#v:zip6">zip6</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> f) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s d -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s e -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s f -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c, d, e, f)</li><li class="src short"><a href="#v:unzip">unzip</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b) -&gt; (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b)</li><li class="src short"><a href="#v:unzip3">unzip3</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c) -&gt; (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c)</li><li class="src short"><a href="#v:unzip4">unzip4</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c, d) -&gt; (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s d)</li><li class="src short"><a href="#v:unzip5">unzip5</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> e) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c, d, e) -&gt; (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s d, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s e)</li><li class="src short"><a href="#v:unzip6">unzip6</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> f) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c, d, e, f) -&gt; (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s d, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s e, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s f)</li><li class="src short"><a href="#v:read">read</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a</li><li class="src short"><a href="#v:write">write</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:swap">swap</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:unsafeRead">unsafeRead</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a</li><li class="src short"><a href="#v:unsafeWrite">unsafeWrite</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:unsafeSwap">unsafeSwap</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:set">set</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:copy">copy</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:move">move</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:unsafeCopy">unsafeCopy</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:unsafeMove">unsafeMove</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li></ul></div><div id="interface"><h1 id="g:1">Mutable vectors of primitive types
</h1><div class="top"><p class="src"><span class="keyword">data family</span> <a name="t:MVector" class="def">MVector</a> s a <a href="src/Data-Vector-Unboxed-Base.html#MVector" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IOVector" class="def">IOVector</a> = <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad-ST-Safe.html#t:RealWorld">RealWorld</a><a href="src/Data-Vector-Unboxed-Base.html#IOVector" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:STVector" class="def">STVector</a> s = <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s<a href="src/Data-Vector-Unboxed-Base.html#STVector" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Data-Vector-Generic.html#t:Vector">Vector</a> <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Generic-Mutable.html#t:MVector">MVector</a> <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> a) =&gt; <a name="t:Unbox" class="def">Unbox</a> a <a href="src/Data-Vector-Unboxed-Base.html#Unbox" class="link">Source</a></p><div class="subs instances"><p id="control.i:Unbox" class="caption collapser" onclick="toggleSection('i:Unbox')">Instances</p><div id="section.i:Unbox" class="show"><table><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Char.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> ()</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:RealFloat">RealFloat</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Complex.html#t:Complex">Complex</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> (a, b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> (a, b, c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> (a, b, c, d)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> e) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> (a, b, c, d, e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> f) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> (a, b, c, d, e, f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Accessors
</h1><h2 id="g:3">Length information
</h2><div class="top"><p class="src"><a name="v:length" class="def">length</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/Data-Vector-Unboxed-Mutable.html#length" class="link">Source</a></p><div class="doc"><p>Length of the mutable vector.
</p></div></div><div class="top"><p class="src"><a name="v:null" class="def">null</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Vector-Unboxed-Mutable.html#null" class="link">Source</a></p><div class="doc"><p>Check whether the vector is empty
</p></div></div><h2 id="g:4">Extracting subvectors
</h2><div class="top"><p class="src"><a name="v:slice" class="def">slice</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a<a href="src/Data-Vector-Unboxed-Mutable.html#slice" class="link">Source</a></p><div class="doc"><p>Yield a part of the mutable vector without copying it.
</p></div></div><div class="top"><p class="src"><a name="v:init" class="def">init</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a<a href="src/Data-Vector-Unboxed-Mutable.html#init" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:tail" class="def">tail</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a<a href="src/Data-Vector-Unboxed-Mutable.html#tail" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:take" class="def">take</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a<a href="src/Data-Vector-Unboxed-Mutable.html#take" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:drop" class="def">drop</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a<a href="src/Data-Vector-Unboxed-Mutable.html#drop" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:splitAt" class="def">splitAt</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a)<a href="src/Data-Vector-Unboxed-Mutable.html#splitAt" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:unsafeSlice" class="def">unsafeSlice</a><a href="src/Data-Vector-Unboxed-Mutable.html#unsafeSlice" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>starting index
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>length of the slice
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Yield a part of the mutable vector without copying it. No bounds checks
 are performed.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeInit" class="def">unsafeInit</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a<a href="src/Data-Vector-Unboxed-Mutable.html#unsafeInit" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:unsafeTail" class="def">unsafeTail</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a<a href="src/Data-Vector-Unboxed-Mutable.html#unsafeTail" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:unsafeTake" class="def">unsafeTake</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a<a href="src/Data-Vector-Unboxed-Mutable.html#unsafeTake" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:unsafeDrop" class="def">unsafeDrop</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a<a href="src/Data-Vector-Unboxed-Mutable.html#unsafeDrop" class="link">Source</a></p></div><h2 id="g:5">Overlapping
</h2><div class="top"><p class="src"><a name="v:overlaps" class="def">overlaps</a> :: <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Vector-Unboxed-Mutable.html#overlaps" class="link">Source</a></p></div><h1 id="g:6">Construction
</h1><h2 id="g:7">Initialisation
</h2><div class="top"><p class="src"><a name="v:new" class="def">new</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)<a href="src/Data-Vector-Unboxed-Mutable.html#new" class="link">Source</a></p><div class="doc"><p>Create a mutable vector of the given length.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeNew" class="def">unsafeNew</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)<a href="src/Data-Vector-Unboxed-Mutable.html#unsafeNew" class="link">Source</a></p><div class="doc"><p>Create a mutable vector of the given length. The length is not checked.
</p></div></div><div class="top"><p class="src"><a name="v:replicate" class="def">replicate</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)<a href="src/Data-Vector-Unboxed-Mutable.html#replicate" class="link">Source</a></p><div class="doc"><p>Create a mutable vector of the given length (0 if the length is negative)
 and fill it with an initial value.
</p></div></div><div class="top"><p class="src"><a name="v:replicateM" class="def">replicateM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)<a href="src/Data-Vector-Unboxed-Mutable.html#replicateM" class="link">Source</a></p><div class="doc"><p>Create a mutable vector of the given length (0 if the length is negative)
 and fill it with values produced by repeatedly executing the monadic action.
</p></div></div><div class="top"><p class="src"><a name="v:clone" class="def">clone</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)<a href="src/Data-Vector-Unboxed-Mutable.html#clone" class="link">Source</a></p><div class="doc"><p>Create a copy of a mutable vector.
</p></div></div><h2 id="g:8">Growing
</h2><div class="top"><p class="src"><a name="v:grow" class="def">grow</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)<a href="src/Data-Vector-Unboxed-Mutable.html#grow" class="link">Source</a></p><div class="doc"><p>Grow a vector by the given number of elements. The number must be
 positive.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeGrow" class="def">unsafeGrow</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)<a href="src/Data-Vector-Unboxed-Mutable.html#unsafeGrow" class="link">Source</a></p><div class="doc"><p>Grow a vector by the given number of elements. The number must be
 positive but this is not checked.
</p></div></div><h2 id="g:9">Restricting memory usage
</h2><div class="top"><p class="src"><a name="v:clear" class="def">clear</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed-Mutable.html#clear" class="link">Source</a></p><div class="doc"><p>Reset all elements of the vector to some undefined value, clearing all
 references to external objects. This is usually a noop for unboxed vectors. 
</p></div></div><h1 id="g:10">Zipping and unzipping
</h1><div class="top"><p class="src"><a name="v:zip" class="def">zip</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b)<a href="src/Data-Vector-Unboxed-Mutable.html#zip" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Zip 2 vectors
</p></div></div><div class="top"><p class="src"><a name="v:zip3" class="def">zip3</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c)<a href="src/Data-Vector-Unboxed-Mutable.html#zip3" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Zip 3 vectors
</p></div></div><div class="top"><p class="src"><a name="v:zip4" class="def">zip4</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s d -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c, d)<a href="src/Data-Vector-Unboxed-Mutable.html#zip4" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Zip 4 vectors
</p></div></div><div class="top"><p class="src"><a name="v:zip5" class="def">zip5</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> e) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s d -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s e -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c, d, e)<a href="src/Data-Vector-Unboxed-Mutable.html#zip5" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Zip 5 vectors
</p></div></div><div class="top"><p class="src"><a name="v:zip6" class="def">zip6</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> f) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s d -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s e -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s f -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c, d, e, f)<a href="src/Data-Vector-Unboxed-Mutable.html#zip6" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Zip 6 vectors
</p></div></div><div class="top"><p class="src"><a name="v:unzip" class="def">unzip</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b) -&gt; (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b)<a href="src/Data-Vector-Unboxed-Mutable.html#unzip" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unzip 2 vectors
</p></div></div><div class="top"><p class="src"><a name="v:unzip3" class="def">unzip3</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c) -&gt; (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c)<a href="src/Data-Vector-Unboxed-Mutable.html#unzip3" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unzip 3 vectors
</p></div></div><div class="top"><p class="src"><a name="v:unzip4" class="def">unzip4</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c, d) -&gt; (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s d)<a href="src/Data-Vector-Unboxed-Mutable.html#unzip4" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unzip 4 vectors
</p></div></div><div class="top"><p class="src"><a name="v:unzip5" class="def">unzip5</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> e) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c, d, e) -&gt; (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s d, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s e)<a href="src/Data-Vector-Unboxed-Mutable.html#unzip5" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unzip 5 vectors
</p></div></div><div class="top"><p class="src"><a name="v:unzip6" class="def">unzip6</a> :: (<a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> f) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s (a, b, c, d, e, f) -&gt; (<a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s a, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s b, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s c, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s d, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s e, <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> s f)<a href="src/Data-Vector-Unboxed-Mutable.html#unzip6" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unzip 6 vectors
</p></div></div><h1 id="g:11">Accessing individual elements
</h1><div class="top"><p class="src"><a name="v:read" class="def">read</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a<a href="src/Data-Vector-Unboxed-Mutable.html#read" class="link">Source</a></p><div class="doc"><p>Yield the element at the given position.
</p></div></div><div class="top"><p class="src"><a name="v:write" class="def">write</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed-Mutable.html#write" class="link">Source</a></p><div class="doc"><p>Replace the element at the given position.
</p></div></div><div class="top"><p class="src"><a name="v:swap" class="def">swap</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed-Mutable.html#swap" class="link">Source</a></p><div class="doc"><p>Swap the elements at the given positions.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeRead" class="def">unsafeRead</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a<a href="src/Data-Vector-Unboxed-Mutable.html#unsafeRead" class="link">Source</a></p><div class="doc"><p>Yield the element at the given position. No bounds checks are performed.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeWrite" class="def">unsafeWrite</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed-Mutable.html#unsafeWrite" class="link">Source</a></p><div class="doc"><p>Replace the element at the given position. No bounds checks are performed.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeSwap" class="def">unsafeSwap</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed-Mutable.html#unsafeSwap" class="link">Source</a></p><div class="doc"><p>Swap the elements at the given positions. No bounds checks are performed.
</p></div></div><h1 id="g:12">Modifying vectors
</h1><h2 id="g:13">Filling and copying
</h2><div class="top"><p class="src"><a name="v:set" class="def">set</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed-Mutable.html#set" class="link">Source</a></p><div class="doc"><p>Set all elements of the vector to the given value.
</p></div></div><div class="top"><p class="src"><a name="v:copy" class="def">copy</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed-Mutable.html#copy" class="link">Source</a></p><div class="doc"><p>Copy a vector. The two vectors must have the same length and may not
 overlap.
</p></div></div><div class="top"><p class="src"><a name="v:move" class="def">move</a> :: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed-Mutable.html#move" class="link">Source</a></p><div class="doc"><p>Move the contents of a vector. The two vectors must have the same
 length.
</p><p>If the vectors do not overlap, then this is equivalent to <code><a href="Data-Vector-Unboxed-Mutable.html#v:copy">copy</a></code>.
 Otherwise, the copying is performed as if the source vector were
 copied to a temporary vector and then the temporary vector was copied
 to the target vector.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeCopy" class="def">unsafeCopy</a><a href="src/Data-Vector-Unboxed-Mutable.html#unsafeCopy" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a</td><td class="doc"><p>target
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a</td><td class="doc"><p>source
</p></td></tr><tr><td class="src">-&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Copy a vector. The two vectors must have the same length and may not
 overlap. This is not checked.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeMove" class="def">unsafeMove</a><a href="src/Data-Vector-Unboxed-Mutable.html#unsafeMove" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m, <a href="Data-Vector-Unboxed-Mutable.html#t:Unbox">Unbox</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a</td><td class="doc"><p>target
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed-Mutable.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a</td><td class="doc"><p>source
</p></td></tr><tr><td class="src">-&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Move the contents of a vector. The two vectors must have the same
 length, but this is not checked.
</p><p>If the vectors do not overlap, then this is equivalent to <code><a href="Data-Vector-Unboxed-Mutable.html#v:unsafeCopy">unsafeCopy</a></code>.
 Otherwise, the copying is performed as if the source vector were
 copied to a temporary vector and then the temporary vector was copied
 to the target vector.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>