TIL: GHC apparently has it’s own internal and efficient UTF-8 string representation FastString


TIL: GHC apparently has it’s own internal and efficient UTF-8 string representation FastString

"FastString is used throughout the compiler, including the pretty-printer, and represents a dense UTF-8 buffer (and a hash for quick comparison)." From PrettyErrors.

Why it has not been released as a separate package for all to use?

How does it compare to Text?

Can the String be internally treated as FastString for efficiency instead of being [Char]?

Submitted June 05, 2017 at 09:34PM by mallai
via reddit http://ift.tt/2sJjr32