| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Data.Text.IDN.Types
Description
Core types for Internationalized Domain Names (IDN) processing.
This module provides types for domain name processing following the IDNA2008 specification (RFC 5890-5893). Types are organized into logical groups: errors, domain structures, Unicode properties, and Punycode internals.
Example
>>>mkLabel "example"Right (ULabel "example")
>>>mkDomainName "example.com"Right (DomainName {labels = ...})
Synopsis
- data IDNError
- = EmptyLabel
- | LabelTooLong {
- actualLength :: Int
- maxLength :: Int
- | TotalDomainTooLong {
- actualLength :: Int
- maxLength :: Int
- | InvalidHyphenPosition HyphenError
- | StartsWithCombiningMark { }
- | DisallowedCodePoint { }
- | InvalidContext {
- character :: Char
- contextRule :: ContextRule
- position :: Int
- context :: Text
- | BidiViolation { }
- | PunycodeDecodeError { }
- data HyphenError
- data PunycodeError
- data Label
- newtype DomainName = DomainName {}
- mkLabel :: Text -> Either IDNError Label
- mkDomainName :: Text -> Either IDNError DomainName
- data CodePointStatus
- data BidiClass
- data ContextRule
- data BidiRule
- data Script
- data PunycodeState = PunycodeState {}
- data PunycodeParams = PunycodeParams {}
- initialState :: PunycodeState
- punycodeParams :: PunycodeParams
Error Types
IDN processing errors with detailed context.
Errors include validation failures, encoding issues, and constraint violations per IDNA2008 (RFC 5890-5893).
Constructors
| EmptyLabel | Domain label cannot be empty |
| LabelTooLong | |
Fields
| |
| TotalDomainTooLong | |
Fields
| |
| InvalidHyphenPosition HyphenError | Hyphen appears in invalid position |
| StartsWithCombiningMark | |
| DisallowedCodePoint | |
| InvalidContext | |
Fields
| |
| BidiViolation | |
| PunycodeDecodeError | |
Instances
data HyphenError Source #
Hyphen position errors.
Domain labels cannot start or end with hyphens, and hyphens at positions 3-4 are reserved for Punycode encoding.
Constructors
| StartsWithHyphen | Label starts with hyphen (invalid) |
| EndsWithHyphen | Label ends with hyphen (invalid) |
| HyphensAt3And4NotPunycode | Hyphens at positions 3-4 but not a valid Punycode label |
Instances
| Generic HyphenError Source # | |||||
Defined in Data.Text.IDN.Types Associated Types
| |||||
| Show HyphenError Source # | |||||
Defined in Data.Text.IDN.Types Methods showsPrec :: Int -> HyphenError -> ShowS # show :: HyphenError -> String # showList :: [HyphenError] -> ShowS # | |||||
| NFData HyphenError Source # | |||||
Defined in Data.Text.IDN.Types Methods rnf :: HyphenError -> () # | |||||
| Eq HyphenError Source # | |||||
Defined in Data.Text.IDN.Types | |||||
| type Rep HyphenError Source # | |||||
Defined in Data.Text.IDN.Types type Rep HyphenError = D1 ('MetaData "HyphenError" "Data.Text.IDN.Types" "idn-0.1.2.0-ECOO1RAUys73BxjjVgDeye" 'False) (C1 ('MetaCons "StartsWithHyphen" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EndsWithHyphen" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HyphensAt3And4NotPunycode" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data PunycodeError Source #
Punycode encoding/decoding errors.
These errors occur during low-level Punycode operations. For domain-level
errors, see IDNError.
Constructors
| InvalidPunycode Text | Malformed Punycode string with reason |
| Overflow | Integer overflow during encoding/decoding |
Instances
| Generic PunycodeError Source # | |||||
Defined in Data.Text.IDN.Types Associated Types
| |||||
| Show PunycodeError Source # | |||||
Defined in Data.Text.IDN.Types Methods showsPrec :: Int -> PunycodeError -> ShowS # show :: PunycodeError -> String # showList :: [PunycodeError] -> ShowS # | |||||
| NFData PunycodeError Source # | |||||
Defined in Data.Text.IDN.Types Methods rnf :: PunycodeError -> () # | |||||
| Eq PunycodeError Source # | |||||
Defined in Data.Text.IDN.Types Methods (==) :: PunycodeError -> PunycodeError -> Bool # (/=) :: PunycodeError -> PunycodeError -> Bool # | |||||
| type Rep PunycodeError Source # | |||||
Defined in Data.Text.IDN.Types type Rep PunycodeError = D1 ('MetaData "PunycodeError" "Data.Text.IDN.Types" "idn-0.1.2.0-ECOO1RAUys73BxjjVgDeye" 'False) (C1 ('MetaCons "InvalidPunycode" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "Overflow" 'PrefixI 'False) (U1 :: Type -> Type)) | |||||
Domain Types
Domain label in either Unicode or ASCII/Punycode form.
Labels are the components of a domain name separated by dots. They can be in Unicode form (U-label) or ASCII/Punycode form (A-label).
Constructors
| ULabel Text | Unicode label (U-label) - contains Unicode characters |
| ALabel Text | ASCII/Punycode label (A-label) - contains ASCII or Punycode with xn-- prefix |
Instances
| Generic Label Source # | |||||
Defined in Data.Text.IDN.Types Associated Types
| |||||
| Show Label Source # | |||||
| NFData Label Source # | |||||
Defined in Data.Text.IDN.Types | |||||
| Eq Label Source # | |||||
| type Rep Label Source # | |||||
Defined in Data.Text.IDN.Types type Rep Label = D1 ('MetaData "Label" "Data.Text.IDN.Types" "idn-0.1.2.0-ECOO1RAUys73BxjjVgDeye" 'False) (C1 ('MetaCons "ULabel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "ALabel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||
newtype DomainName Source #
Complete domain name consisting of one or more labels.
A domain name is a non-empty sequence of labels separated by dots. The total length must not exceed 253 characters.
Constructors
| DomainName | |
Instances
| Generic DomainName Source # | |||||
Defined in Data.Text.IDN.Types Associated Types
| |||||
| Show DomainName Source # | |||||
Defined in Data.Text.IDN.Types Methods showsPrec :: Int -> DomainName -> ShowS # show :: DomainName -> String # showList :: [DomainName] -> ShowS # | |||||
| NFData DomainName Source # | |||||
Defined in Data.Text.IDN.Types Methods rnf :: DomainName -> () # | |||||
| Eq DomainName Source # | |||||
Defined in Data.Text.IDN.Types | |||||
| type Rep DomainName Source # | |||||
Defined in Data.Text.IDN.Types type Rep DomainName = D1 ('MetaData "DomainName" "Data.Text.IDN.Types" "idn-0.1.2.0-ECOO1RAUys73BxjjVgDeye" 'True) (C1 ('MetaCons "DomainName" 'PrefixI 'True) (S1 ('MetaSel ('Just "labels") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Label)))) | |||||
mkLabel :: Text -> Either IDNError Label Source #
Smart constructor for Label with invariant enforcement.
Validates that the label is non-empty and within length constraints. Automatically detects A-labels (those starting with "xn--").
Examples
>>>mkLabel "example"Right (ULabel "example")
>>>mkLabel "xn--mnchen-3ya"Right (ALabel "xn--mnchen-3ya")
>>>mkLabel ""Left EmptyLabel
mkDomainName :: Text -> Either IDNError DomainName Source #
Smart constructor for DomainName with invariant enforcement.
Validates that the domain is non-empty, within length constraints, and properly formatted. Splits on dots to create individual labels.
Examples
>>>mkDomainName "example.com"Right (DomainName {labels = ...})
>>>mkDomainName ""Left EmptyLabel
Unicode Property Types
data CodePointStatus Source #
IDNA2008 code point status per RFC 5892.
Each Unicode code point is classified according to its validity for use in IDN labels.
Constructors
| PVALID | Always valid in domain names |
| DISALLOWED | Never valid in domain names |
| CONTEXTJ | Valid only in specific contexts (Join_Control) |
| CONTEXTO | Valid only in specific contexts (Other) |
| UNASSIGNED | Not assigned in this Unicode version |
Instances
| Bounded CodePointStatus Source # | |||||
Defined in Data.Text.IDN.Types | |||||
| Enum CodePointStatus Source # | |||||
Defined in Data.Text.IDN.Types Methods succ :: CodePointStatus -> CodePointStatus # pred :: CodePointStatus -> CodePointStatus # toEnum :: Int -> CodePointStatus # fromEnum :: CodePointStatus -> Int # enumFrom :: CodePointStatus -> [CodePointStatus] # enumFromThen :: CodePointStatus -> CodePointStatus -> [CodePointStatus] # enumFromTo :: CodePointStatus -> CodePointStatus -> [CodePointStatus] # enumFromThenTo :: CodePointStatus -> CodePointStatus -> CodePointStatus -> [CodePointStatus] # | |||||
| Generic CodePointStatus Source # | |||||
Defined in Data.Text.IDN.Types Associated Types
Methods from :: CodePointStatus -> Rep CodePointStatus x # to :: Rep CodePointStatus x -> CodePointStatus # | |||||
| Show CodePointStatus Source # | |||||
Defined in Data.Text.IDN.Types Methods showsPrec :: Int -> CodePointStatus -> ShowS # show :: CodePointStatus -> String # showList :: [CodePointStatus] -> ShowS # | |||||
| NFData CodePointStatus Source # | |||||
Defined in Data.Text.IDN.Types Methods rnf :: CodePointStatus -> () # | |||||
| Eq CodePointStatus Source # | |||||
Defined in Data.Text.IDN.Types Methods (==) :: CodePointStatus -> CodePointStatus -> Bool # (/=) :: CodePointStatus -> CodePointStatus -> Bool # | |||||
| Ord CodePointStatus Source # | |||||
Defined in Data.Text.IDN.Types Methods compare :: CodePointStatus -> CodePointStatus -> Ordering # (<) :: CodePointStatus -> CodePointStatus -> Bool # (<=) :: CodePointStatus -> CodePointStatus -> Bool # (>) :: CodePointStatus -> CodePointStatus -> Bool # (>=) :: CodePointStatus -> CodePointStatus -> Bool # max :: CodePointStatus -> CodePointStatus -> CodePointStatus # min :: CodePointStatus -> CodePointStatus -> CodePointStatus # | |||||
| type Rep CodePointStatus Source # | |||||
Defined in Data.Text.IDN.Types type Rep CodePointStatus = D1 ('MetaData "CodePointStatus" "Data.Text.IDN.Types" "idn-0.1.2.0-ECOO1RAUys73BxjjVgDeye" 'False) ((C1 ('MetaCons "PVALID" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DISALLOWED" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CONTEXTJ" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CONTEXTO" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UNASSIGNED" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
Unicode bidirectional character class per Unicode Character Database (UCD).
Used for bidirectional text validation per RFC 5893.
Constructors
| L | Left-to-Right |
| R | Right-to-Left |
| AL | Right-to-Left Arabic |
| AN | Arabic Number |
| EN | European Number |
| ES | European Number Separator |
| ET | European Number Terminator |
| CS | Common Number Separator |
| NSM | Nonspacing Mark |
| BN | Boundary Neutral |
| B | Paragraph Separator |
| S | Segment Separator |
| WS | Whitespace |
| ON | Other Neutral |
| LRE | Left-to-Right Embedding |
| LRO | Left-to-Right Override |
| RLE | Right-to-Left Embedding |
| RLO | Right-to-Left Override |
Pop Directional Format | |
| LRI | Left-to-Right Isolate |
| RLI | Right-to-Left Isolate |
| FSI | First Strong Isolate |
| PDI | Pop Directional Isolate |
Instances
| Bounded BidiClass Source # | |||||
| Enum BidiClass Source # | |||||
Defined in Data.Text.IDN.Types Methods succ :: BidiClass -> BidiClass # pred :: BidiClass -> BidiClass # fromEnum :: BidiClass -> Int # enumFrom :: BidiClass -> [BidiClass] # enumFromThen :: BidiClass -> BidiClass -> [BidiClass] # enumFromTo :: BidiClass -> BidiClass -> [BidiClass] # enumFromThenTo :: BidiClass -> BidiClass -> BidiClass -> [BidiClass] # | |||||
| Generic BidiClass Source # | |||||
Defined in Data.Text.IDN.Types Associated Types
| |||||
| Show BidiClass Source # | |||||
| NFData BidiClass Source # | |||||
Defined in Data.Text.IDN.Types | |||||
| Eq BidiClass Source # | |||||
| Ord BidiClass Source # | |||||
| type Rep BidiClass Source # | |||||
Defined in Data.Text.IDN.Types type Rep BidiClass = D1 ('MetaData "BidiClass" "Data.Text.IDN.Types" "idn-0.1.2.0-ECOO1RAUys73BxjjVgDeye" 'False) ((((C1 ('MetaCons "L" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "R" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "AL" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EN" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ES" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ET" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CS" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "NSM" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "B" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "S" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "WS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ON" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "LRE" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LRO" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RLE" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "RLO" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PDF" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LRI" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "RLI" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FSI" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PDI" 'PrefixI 'False) (U1 :: Type -> Type)))))) | |||||
data ContextRule Source #
Contextual validation rules from RFC 5892 Appendix A.
Some code points are only valid in specific contexts. These rules define those contexts.
Constructors
| ZWNJRule | A.1: Zero Width Non-Joiner (U+200C) |
| ZWJRule | A.2: Zero Width Joiner (U+200D) |
| MiddleDotRule | A.3: Middle Dot (U+00B7) |
| GreekKeraiaRule | A.4: Greek Lower Numeral Sign (U+0375) |
| HebrewGereshRule | A.5: Hebrew Punctuation Geresh (U+05F3) |
| HebrewGershayimRule | A.6: Hebrew Punctuation Gershayim (U+05F4) |
| KatakanaMiddleDotRule | A.7: Katakana Middle Dot (U+30FB) |
| ArabicIndicDigitsRule | A.8: Arabic-Indic Digits (U+0660..U+0669) |
| ExtendedArabicIndicDigitsRule | A.9: Extended Arabic-Indic Digits (U+06F0..U+06F9) |
Instances
| Bounded ContextRule Source # | |||||
Defined in Data.Text.IDN.Types | |||||
| Enum ContextRule Source # | |||||
Defined in Data.Text.IDN.Types Methods succ :: ContextRule -> ContextRule # pred :: ContextRule -> ContextRule # toEnum :: Int -> ContextRule # fromEnum :: ContextRule -> Int # enumFrom :: ContextRule -> [ContextRule] # enumFromThen :: ContextRule -> ContextRule -> [ContextRule] # enumFromTo :: ContextRule -> ContextRule -> [ContextRule] # enumFromThenTo :: ContextRule -> ContextRule -> ContextRule -> [ContextRule] # | |||||
| Generic ContextRule Source # | |||||
Defined in Data.Text.IDN.Types Associated Types
| |||||
| Show ContextRule Source # | |||||
Defined in Data.Text.IDN.Types Methods showsPrec :: Int -> ContextRule -> ShowS # show :: ContextRule -> String # showList :: [ContextRule] -> ShowS # | |||||
| NFData ContextRule Source # | |||||
Defined in Data.Text.IDN.Types Methods rnf :: ContextRule -> () # | |||||
| Eq ContextRule Source # | |||||
Defined in Data.Text.IDN.Types | |||||
| Ord ContextRule Source # | |||||
Defined in Data.Text.IDN.Types Methods compare :: ContextRule -> ContextRule -> Ordering # (<) :: ContextRule -> ContextRule -> Bool # (<=) :: ContextRule -> ContextRule -> Bool # (>) :: ContextRule -> ContextRule -> Bool # (>=) :: ContextRule -> ContextRule -> Bool # max :: ContextRule -> ContextRule -> ContextRule # min :: ContextRule -> ContextRule -> ContextRule # | |||||
| type Rep ContextRule Source # | |||||
Defined in Data.Text.IDN.Types type Rep ContextRule = D1 ('MetaData "ContextRule" "Data.Text.IDN.Types" "idn-0.1.2.0-ECOO1RAUys73BxjjVgDeye" 'False) (((C1 ('MetaCons "ZWNJRule" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ZWJRule" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MiddleDotRule" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GreekKeraiaRule" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "HebrewGereshRule" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HebrewGershayimRule" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KatakanaMiddleDotRule" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ArabicIndicDigitsRule" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExtendedArabicIndicDigitsRule" 'PrefixI 'False) (U1 :: Type -> Type))))) | |||||
Bidirectional text rules from RFC 5893.
These rules ensure proper bidirectional text handling in RTL labels.
Constructors
| Rule1 | Presence of RTL characters triggers RTL validation |
| Rule2 | First character must be R or AL |
| Rule3 | Last character must be R, AL, AN, or EN |
| Rule4 | NSM may only follow allowed character types |
| Rule5 | ES and CS constraints in RTL labels |
| Rule6 | EN and AN cannot be mixed |
Instances
| Bounded BidiRule Source # | |||||
| Enum BidiRule Source # | |||||
Defined in Data.Text.IDN.Types | |||||
| Generic BidiRule Source # | |||||
Defined in Data.Text.IDN.Types Associated Types
| |||||
| Show BidiRule Source # | |||||
| NFData BidiRule Source # | |||||
Defined in Data.Text.IDN.Types | |||||
| Eq BidiRule Source # | |||||
| Ord BidiRule Source # | |||||
Defined in Data.Text.IDN.Types | |||||
| type Rep BidiRule Source # | |||||
Defined in Data.Text.IDN.Types type Rep BidiRule = D1 ('MetaData "BidiRule" "Data.Text.IDN.Types" "idn-0.1.2.0-ECOO1RAUys73BxjjVgDeye" 'False) ((C1 ('MetaCons "Rule1" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Rule2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Rule3" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Rule4" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Rule5" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Rule6" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
Unicode script assignment.
Scripts are used for contextual validation of certain code points.
Constructors
| Latin | |
| Greek | |
| Cyrillic | |
| Hebrew | |
| Arabic | |
| Devanagari | |
| Bengali | |
| Gurmukhi | |
| Gujarati | |
| Oriya | |
| Tamil | |
| Telugu | |
| Kannada | |
| Malayalam | |
| Thai | |
| Lao | |
| Tibetan | |
| Myanmar | |
| Georgian | |
| Hangul | |
| Hiragana | |
| Katakana | |
| Han | |
| OtherScript |
Instances
| Bounded Script Source # | |||||
| Enum Script Source # | |||||
Defined in Data.Text.IDN.Types | |||||
| Generic Script Source # | |||||
Defined in Data.Text.IDN.Types Associated Types
| |||||
| Show Script Source # | |||||
| NFData Script Source # | |||||
Defined in Data.Text.IDN.Types | |||||
| Eq Script Source # | |||||
| Ord Script Source # | |||||
| type Rep Script Source # | |||||
Defined in Data.Text.IDN.Types type Rep Script = D1 ('MetaData "Script" "Data.Text.IDN.Types" "idn-0.1.2.0-ECOO1RAUys73BxjjVgDeye" 'False) ((((C1 ('MetaCons "Latin" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Greek" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Cyrillic" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Hebrew" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Arabic" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Devanagari" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Bengali" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Gurmukhi" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Gujarati" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Oriya" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Tamil" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Telugu" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Kannada" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Malayalam" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Thai" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Lao" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Tibetan" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Myanmar" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Georgian" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Hangul" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Hiragana" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Katakana" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Han" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherScript" 'PrefixI 'False) (U1 :: Type -> Type)))))) | |||||
Punycode Types
data PunycodeState Source #
Punycode algorithm state per RFC 3492.
Internal state used during Punycode encoding/decoding. Not typically needed by users of the library.
Constructors
| PunycodeState | |
Instances
| Generic PunycodeState Source # | |||||
Defined in Data.Text.IDN.Types Associated Types
| |||||
| Show PunycodeState Source # | |||||
Defined in Data.Text.IDN.Types Methods showsPrec :: Int -> PunycodeState -> ShowS # show :: PunycodeState -> String # showList :: [PunycodeState] -> ShowS # | |||||
| NFData PunycodeState Source # | |||||
Defined in Data.Text.IDN.Types Methods rnf :: PunycodeState -> () # | |||||
| Eq PunycodeState Source # | |||||
Defined in Data.Text.IDN.Types Methods (==) :: PunycodeState -> PunycodeState -> Bool # (/=) :: PunycodeState -> PunycodeState -> Bool # | |||||
| type Rep PunycodeState Source # | |||||
Defined in Data.Text.IDN.Types type Rep PunycodeState = D1 ('MetaData "PunycodeState" "Data.Text.IDN.Types" "idn-0.1.2.0-ECOO1RAUys73BxjjVgDeye" 'False) (C1 ('MetaCons "PunycodeState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "n") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "delta") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "bias") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "h") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int)))) | |||||
data PunycodeParams Source #
Punycode algorithm parameters per RFC 3492.
Constants used in the Punycode algorithm. Not typically needed by users.
Constructors
| PunycodeParams | |
Instances
| Generic PunycodeParams Source # | |||||
Defined in Data.Text.IDN.Types Associated Types
Methods from :: PunycodeParams -> Rep PunycodeParams x # to :: Rep PunycodeParams x -> PunycodeParams # | |||||
| Show PunycodeParams Source # | |||||
Defined in Data.Text.IDN.Types Methods showsPrec :: Int -> PunycodeParams -> ShowS # show :: PunycodeParams -> String # showList :: [PunycodeParams] -> ShowS # | |||||
| NFData PunycodeParams Source # | |||||
Defined in Data.Text.IDN.Types Methods rnf :: PunycodeParams -> () # | |||||
| Eq PunycodeParams Source # | |||||
Defined in Data.Text.IDN.Types Methods (==) :: PunycodeParams -> PunycodeParams -> Bool # (/=) :: PunycodeParams -> PunycodeParams -> Bool # | |||||
| type Rep PunycodeParams Source # | |||||
Defined in Data.Text.IDN.Types type Rep PunycodeParams = D1 ('MetaData "PunycodeParams" "Data.Text.IDN.Types" "idn-0.1.2.0-ECOO1RAUys73BxjjVgDeye" 'False) (C1 ('MetaCons "PunycodeParams" 'PrefixI 'True) ((S1 ('MetaSel ('Just "base") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "tmin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "tmax") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "skew") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "damp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))) | |||||
initialState :: PunycodeState Source #
Initial Punycode state per RFC 3492.
Starting state for Punycode encoding operations.
punycodeParams :: PunycodeParams Source #
Standard Punycode parameters from RFC 3492.