Right now there's many ways of creating empty Text values that are represented by distinct heap objects. This is a waste of memory and it would be good if the library guaranteed that they were all represented by Data.Text.empty.
My suggestion is that whenever we detect that we are creating a zero length Text value, let's use Data.Text.empty rather than create a new heap object.
I'd be happy to give implementing this a go
Right now there's many ways of creating empty
Textvalues that are represented by distinct heap objects. This is a waste of memory and it would be good if the library guaranteed that they were all represented byData.Text.empty.My suggestion is that whenever we detect that we are creating a zero length
Textvalue, let's useData.Text.emptyrather than create a new heap object.I'd be happy to give implementing this a go