Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Checks that satisfy D76 Unicode standard (text replaces chars that are in range U+D800 to U+DFFF inclusive)
Note, no IsSuperset "r-UNICODE.D76" "r-CHAR8" mapping even though the numeric range of D76 includes all CHAR8 bytes.
This is more nominal
decision that prevents certain unwanted conversions from being possible.
Similarly no IsSuperset "r-UNICODE.D76" "r-ByteRep", this annotation acts as a guard to what can go into Text
.
Since: 0.4.0.0
Synopsis
- newtype NonTextChar = NonTextChar Char
- encD76Char :: Encoding (Either EncodeEx) "r-UNICODE.D76" "r-UNICODE.D76" c Char
- encD76 :: Encoding (Either EncodeEx) "r-UNICODE.D76" "r-UNICODE.D76" c String
- trustMe :: Applicative f => Encoding f "r-UNICODE.D76" "r-UNICODE.D76" c String
- nonTextChar :: Char -> Bool
- encImpl :: String -> Either NonTextChar String
Documentation
>>>
:set -XDataKinds -XTypeApplications
newtype NonTextChar Source #
Instances
Eq NonTextChar Source # | |
Defined in Data.TypedEncoding.Instances.Restriction.D76 (==) :: NonTextChar -> NonTextChar -> Bool # (/=) :: NonTextChar -> NonTextChar -> Bool # | |
Show NonTextChar Source # | |
Defined in Data.TypedEncoding.Instances.Restriction.D76 showsPrec :: Int -> NonTextChar -> ShowS # show :: NonTextChar -> String # showList :: [NonTextChar] -> ShowS # |
Encoding "r-UNICODE.D76"
trustMe :: Applicative f => Encoding f "r-UNICODE.D76" "r-UNICODE.D76" c String Source #
No-check version
Decoding "r-UNICODE.D76"
Implementation
nonTextChar :: Char -> Bool Source #
Orphan instances
(RecreateErr f, Applicative f) => Validate f "r-UNICODE.D76" "r-UNICODE.D76" () String Source # | |
validation :: Validation f "r-UNICODE.D76" "r-UNICODE.D76" () String Source # | |
Applicative f => Decode f "r-UNICODE.D76" "r-UNICODE.D76" c str Source # | |
Encode (Either EncodeEx) "r-UNICODE.D76" "r-UNICODE.D76" c String Source # | |
Encode (Either EncodeEx) "r-UNICODE.D76" "r-UNICODE.D76" c Char Source # | |