[vector] #24: Conversion between different types of vectors

vector vector at projects.haskell.org
Sun Jun 13 16:16:00 EDT 2010


#24: Conversion between different types of vectors
------------------------+---------------------------------------------------
Reporter:  Khudyakov    |       Owner:     
    Type:  enhancement  |      Status:  new
Priority:  major        |   Milestone:     
 Version:               |    Keywords:     
------------------------+---------------------------------------------------
 Problems which require conversion between different types of vectors arise
 from time to time and they are not described in documentation.

 I think most important is conversion between unboxed and storable vectors.
 Unboxed vectors are more convenient to work with (Tuples!) and with
 storables one could hook into FFI. Conversion between these types should
 be covered in documentation. In this case O(1) conversion is of course
 preferable.

 Currently there are two method for vector conversion.
 {{{
 convert1 = fromList . toList

 convert2 v = generate (length v) (v !)
 }}}

 So please provide either function for conversion between vectors or
 describe this in documentation.

-- 
Ticket URL: <http://trac.haskell.org/vector/ticket/24>
vector <http://trac.haskell.org/vector>
Package vector


More information about the vector mailing list