class

MVector

(

Mutable

v

)

a

=>

Vector

v

a

where

(

中略

)

-- | Evaluate @a@ as far as storing it in a vector would and yield @b@.

-- The @v a@ argument only fixes the type and is not touched. The method is

-- only used for optimisation purposes. Thus, it is safe for instances of

-- 'Vector' to evaluate @a@ less than it would be when stored in a vector

-- although this might result in suboptimal code.

--

-- > elemseq v x y = (singleton x `asTypeOf` v) `seq` y

--

-- Default defintion: @a@ is not evaluated at all

--

elemseq

::

v

a

->

a

->

b

->

b

{-# INLINE elemseq #-}

elemseq

_

=

\

_

x

->

x