[vector] #83: PhaseChange class, Mutable data family

vector vector at projects.haskell.org
Mon Sep 24 17:04:13 BST 2012

#83: PhaseChange class, Mutable data family
Reporter:  illissius    |        Owner:     
    Type:  enhancement  |       Status:  new
Priority:  minor        |    Milestone:     
 Version:               |   Resolution:     
Keywords:               |  

Comment(by rl):

 This is actually fairly similar to what vector already uses. If you get
 rid of the copy method (which seems wrong in that class to me), then you
 could make Mutable a type family rather than an associated data type.

 Using unsafeThaw in thaw is wrong since unsafeThaw is not a noop for boxed
 arrays. It tells the compiler that the array might change and that the GC
 has to be prepared to handle such changes.

 In general, I wouldn't be against extracting the
 Mutable/unsafeFreeze/unsafeThaw into a separate type class but alas, I
 can't change Mutable v s a to Mutable (v a) s.

Ticket URL: <http://trac.haskell.org/vector/ticket/83#comment:1>
vector <http://trac.haskell.org/vector>
Package vector

More information about the vector mailing list