idna 0.2 → 0.3.0
raw patch · 2 files changed
+12/−7 lines, 2 filesdep ~stringprep
Dependency ranges changed: stringprep
Files
- Text/IDNA.hs +4/−4
- idna.cabal +8/−3
Text/IDNA.hs view
@@ -4,8 +4,7 @@ where import Text.StringPrep-import Text.NamePrep-import Control.Monad+import Text.StringPrep.Profiles import qualified Data.Text as Text import Data.Text (Text) import qualified Data.Text.Punycode as Puny@@ -34,13 +33,14 @@ then Nothing else case return (Puny.encode step3) of -- TODO: this can fail? Left _ -> Nothing- Right t -> return $ acePrefix `Text.append` E.decodeUtf8 t+ Right t' -> return $ acePrefix `Text.append` E.decodeUtf8 t' else return step3 if Text.length step7 <= 63 then return step7 else Nothing +isLDHascii :: Char -> Bool isLDHascii c = '\x0' <= c && c <= '\x2c' || '\x2e' <= c && c <= '\x2f' ||@@ -70,7 +70,7 @@ case toASCII allowUnassigned useSTD3ASCIIRules step5 of Nothing -> return step3- Just t -> if t == step3+ Just t' -> if t' == step3 then return step5 else return step3
idna.cabal view
@@ -1,5 +1,5 @@ Name: idna-Version: 0.2+Version: 0.3.0 Description: Implements IDNA - Internationalized Domain Names in Applications (RFC 3490). Synopsis: Implements IDNA (RFC 3490). License: BSD3@@ -11,10 +11,15 @@ Category: Data, Text, RFC Library- Build-Depends: base >= 4.3 && < 5, stringprep>=0.1.2, text>=0.1, punycode>=2.0+ Build-Depends: base >= 4.3 && < 5, stringprep >=1 && < 2, text>=0.1, punycode>=2.0 Exposed-modules: Text.IDNA ghc-options: -O2 -Wall source-repository head type: git- location: https://github.com/Porges/idna-hs+ location: https://github.com/Porges/idna-hs.git++source-repository this+ type: git+ location: https://github.com/Porges/idna-hs.git+ tag: v0.3.0