Storable Vector constructor is not exported
which fordbids doing some stuff.
The MVector constructor is exported, so I can workaround stuff for now, but it's still not great.
I think that exposing constructors for mutable was a mistake. But is there anything that that isn't covered by unsafe{To,From}ForeignPtr{,0}?
I think that exposing constructors for mutable was a mistake. But is there anything that that isn't covered by unsafe{To,From}ForeignPtr{,0}?
Probably not, but for primitive vectors there aren't conversions to/from ByteArrays, so I wasn't even looking for conversions to ForeignPtr.
I'd say if you going to hide storable MVector constructor (please don't), you should hide primitive MVector and Vector constructors; otherwise there is inconsistency in API.
Probably not, but for primitive vectors there aren't conversions to/from ByteArrays, so I wasn't even looking for conversions to ForeignPtr.
That's clearly a missing API.
What I don't like about exposed constructors: their use is unsafe and they're imported by default, If one would say import some Unsafe module to get access to constructors it wouldn't be bad. But vector originally did a poor job at separating safe and unsafe API. And any attempt to reorganize would cause too much breakage.