What's going on in this type signature? (Vector.Mutable modifiers in Haskell)
问题 Mutable vectors in Haskell have three element-level mutators: read :: PrimMonad m => MVector (PrimState m) a -> Int -> m a write :: PrimMonad m => MVector (PrimState m) a -> Int -> a -> m () swap :: PrimMonad m => MVector (PrimState m) a -> Int -> Int -> m () Now I can use these fine -- import Data.Vector import Data.Vector.Mutable import Control.Monad.ST import Control.Monad.Primitive incrAt :: Vector Double -> Int -> Vector Double incrAt vec i = runST $ do mvec <- thaw vec oldval <- read