[vector] #46: Signature of backpermute is unnessesary restrictive

vector vector at projects.haskell.org
Thu Oct 21 12:39:29 EDT 2010


#46: Signature of backpermute is unnessesary restrictive
----------------------+-----------------------------------------------------
Reporter:  Khudyakov  |       Owner:     
    Type:  defect     |      Status:  new
Priority:  major      |   Milestone:     
 Version:             |    Keywords:     
----------------------+-----------------------------------------------------
 I think that type signature of backpermute is bit restrictive
 {{{
 backpermute :: (Vector v a, Vector v Int) ⇒ v a → v Int → v a
 }}}

 More liberal signature makes perfect sense. If vector are not the same
 things are still perfectly sensible.
 {{{
 backpermute :: (Vector v a, Vector v' Int) ⇒ v a → v' Int → v a
 }}}

 I encountered this when I tried to permute generic vector using unboxed
 one.

 Of course there may be performance considerations, implementation
 difficulties etc

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


More information about the vector mailing list