Skip to content

Document Desugaring of String Literals

Summary

Location of documentation issue: GHC user manual

There was some confusion around string literals and primitive string literals on !2165 (closed). I've also been tripped up by something similar in the ByteArray Literals Proposal. Looking at the user manual, I realized that there is no discussion of this topic at all.

Proposed improvements or changes

It's a fairly in-the-weeds topic that doesn't concern most users, but the desugaring of string (and primitive string) literals should really be spelled out in the user manual, cross referencing additional documentation in bytestring that explains the rewrite rule that helps reduce the cost of ByteStrings created using OverloadedStrings. That way, this information isn't just locked away in comments on issue trackers.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information