typed-encoding-0.5.2.0: Type safe string transformations

Safe HaskellSafe
LanguageHaskell2010

Data.TypedEncoding.Instances.Restriction.D76

Contents

Description

"r-UNICODE.D76" restricts Unicode characters by excluding the range U+D800 to U+DFFF.

This is important because the commonly used Text type from text package replaces chars that are in range U+D800 to U+DFFF (inclusive).

Note, there is 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 there is no IsSuperset "r-UNICODE.D76" "r-ByteRep", "r-UNICODE.D76" acts as a guard to what can go into Text and this prevents some unwanted conversions.

Since: 0.4.0.0

Synopsis

Documentation

>>> :set -XDataKinds -XTypeApplications

Encoding "r-UNICODE.D76"

encD76Char :: Encoding (Either EncodeEx) "r-UNICODE.D76" "r-UNICODE.D76" c Char Source #

encD76 :: Encoding (Either EncodeEx) "r-UNICODE.D76" "r-UNICODE.D76" c String Source #

trustMe :: Applicative f => Encoding f "r-UNICODE.D76" "r-UNICODE.D76" c String Source #

No-check version

Decoding "r-UNICODE.D76"

Implementation

Orphan instances

(RecreateErr f, Applicative f) => Validate f "r-UNICODE.D76" "r-UNICODE.D76" () String Source # 
Instance details

Methods

validation :: Validation f "r-UNICODE.D76" "r-UNICODE.D76" () String Source #

Applicative f => Decode f "r-UNICODE.D76" "r-UNICODE.D76" c str Source # 
Instance details

Methods

decoding :: Decoding f "r-UNICODE.D76" "r-UNICODE.D76" c str Source #

Encode (Either EncodeEx) "r-UNICODE.D76" "r-UNICODE.D76" c String Source # 
Instance details

Methods

encoding :: Encoding (Either EncodeEx) "r-UNICODE.D76" "r-UNICODE.D76" c String Source #

Encode (Either EncodeEx) "r-UNICODE.D76" "r-UNICODE.D76" c Char Source # 
Instance details

Methods

encoding :: Encoding (Either EncodeEx) "r-UNICODE.D76" "r-UNICODE.D76" c Char Source #