[Ticket #2393] Text.PrettyPrint.HughesPJ: Bug fixes, performance improvement

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed Jun 25 13:50:37 EDT 2008


On Wed, 2008-06-25 at 16:03 +0200, Benedikt Huber wrote:

> Btw, is there any use for the (PStr :: String -> TextDetails) constructor ?

Previously it was used for PackedString (or some predecessor of it) but
at some point it got changed to String. There is really very little
advantage to PackedString over String because PackedString is very slow.

However we should not get rid of the PStr constructor, we should change
it to use the new Unicode string type that is in the works. That will be
fast and memory efficient (using a similar underlying representation as
ByteStrings).

So yeah, I suggest we leave it for now and change it to the new fast
unicode text type at some point in the future when that is ready.

Duncan



More information about the Libraries mailing list