text Modulerebase-1.21.2Haskell2010
Rebase.Data.Text.Internal
- 2 types
- 11 values
- Packagerebase-1.21.2
- Exports13
- LanguageHaskell2010
- LicenceMIT
- SourceInternal.hs
Map a Char to a Text-safe value.
Unicode Surrogate code points are not included in the set of Unicode scalar values, but are unfortunately admitted as valid Char values by Haskell. They cannot be represented in a Text. This function remaps those code points to the Unicode replacement character (U+FFFD, '�'), and leaves other code points unchanged.
Instances15IsList, Eq, Data, Ord, Read, Show, …
IsList TextDefined in text-2.1.3 · Data.Text · orphanPerforms replacement on invalid scalar values:
Example2 expressions :set -XOverloadedLists['\55555'] :: Text"\65533"
Eq TextDefined in text-2.1.3 · Data.Text · orphanData TextDefined in text-2.1.3 · Data.Text · orphanThis instance preserves data abstraction at the cost of inefficiency. We omit reflection services for the sake of data abstraction.
This instance was created by copying the updated behavior of
Data.Set.Set andData.Map.Data.Map.Map. If you feel a mistake has been made, please feel free to submit improvements.The original discussion is archived here: could we get a Data instance for Data.Text.Text?
The followup discussion that changed the behavior of Set and
Data.Map.Mapis archived here: Proposal: Allow gunfold for Data.Map, ...Ord TextDefined in text-2.1.3 · Data.Text · orphanRead TextDefined in text-2.1.3 · Data.Text · orphanShow TextDefined in text-2.1.3 · Data.Text.Show · orphanIsString TextDefined in text-2.1.3 · Data.Text · orphanPerforms replacement on invalid scalar values:
Example2 expressions :set -XOverloadedStrings"\55555" :: Text"\65533"
Semigroup TextDefined in text-2.1.3 · Data.Text · orphanBeware:
stimeswill crash if the given number does not fit into anInt.Monoid TextDefined in text-2.1.3 · Data.Text · orphanPrintfArg TextDefined in text-2.1.3 · Data.Text · orphanNFData TextDefined in text-2.1.3 · Data.Text · orphanBinary TextDefined in text-2.1.3 · Data.Text · orphanHashable TextDefined in hashable-1.4.7.0 · Data.Hashable.ClassLift TextDefined in text-2.1.3 · Data.Text · orphantype Item Text = CharDefined in text-2.1.3 · Data.Text · orphan
O(1) The empty Text.
Type synonym for the strict flavour of Text.
Apply a function to the first element of an optional pair.
Checked multiplication. Calls error if the result would overflow.
Checked multiplication. Calls error if the result would overflow.
Checked multiplication. Calls error if the result would overflow.
Deprecated. Use text instead
A useful show-like function for debugging purposes.