Data.Primitive.ByteArray.ByteArray + instances in base?
Motivation
Several libraries define a boxed wrapper for ByteArray#
:
-
bytestring
definesShortByteString
, -
text
definesArray
, -
primitive
definesByteArray
, -
basement
definesBlock
, -
streamly
definedPrimArray
.
This is a suboptimal situation, causing significant duplication and (more importantly) complicating APIs of respective packages and interoperation between them.
Proposal
Export a boxed ByteArray
type as defined in Data.Primitive.ByteArray
+ its instances from a new module in base
.
There may be more ambitious proposals (e. g., export other utilities from Data.Primitive.ByteArray
; export boxed MutableByteArray
, etc.), but I'd like to avoid endless bikeshedding, so decided to propose the bare minimum.
CC @andrewthad