-
Notifications
You must be signed in to change notification settings - Fork 691
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
Distribution.Simple.Utils.ShortText
type (#3898)
This implements a type with a compact representation of `[Char]`. The data is stored internally as UTF8 in an 'Data.ByteString.Short.ShortByteString' when compiled against `bytestring >= 0.10.4`, and otherwise in a plain old `[Char]`. `ShortByteString` is available only from `bytestring` 0.10.4 on, and GHC 7.8.4 was the first GHC to bundle `binary-0.10.4`. So this fallback affects mostly only GHC 7.6 and older. Note: Originally a strict `ByteString` was used as fallback for this patch. However, the `[Char]` fallback avoids pinned memory and may be more preferable when dealing with many small `ShortText`s
- Loading branch information
Showing
3 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters