Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Data.Textual.Class
Description
Type class for textual data and simple (fromItegral like) conversion between them.
The conversion utility here, although simple may not be the fastest one available, and aims at preserving the textual representation of data, not its binary structure. This, given the existence of codecs with ambiguous representation means that the following function may evaluate to False:
mayBeFalse :: Textual a => a -> Bool mayBeFalse a = let b = fromText a in a == b
Documentation
class IsString a => Textual a where Source
Type class for data structures that are logically text
Instances
Textual String | |
Textual ByteString | With UTF-8 encoding |
Textual ByteString | With UTF-8 encoding |
Textual Text |
fromTextual :: (Textual a, Textual b) => a -> b Source
Converts between instances of Textual