validity-text 0.2.0.0 → 0.2.0.1
raw patch · 2 files changed
+38/−30 lines, 2 files
Files
- src/Data/Validity/Text.hs +4/−4
- validity-text.cabal +34/−26
src/Data/Validity/Text.hs view
@@ -37,10 +37,10 @@ ] validate t@(Text arr off len) = mconcat- [ len >= 0 <?!> "The length is positive."- , off >= 0 <?!> "The offset is positive."+ [ len >= 0 <?@> "The length is positive."+ , off >= 0 <?@> "The offset is positive." , (let c = A.unsafeIndex arr off- in len == 0 || c < 0xDC00 || c > 0xDFFF) <?!>+ in len == 0 || c < 0xDC00 || c > 0xDFFF) <?@> "The offset character is valid UTF16." -- It contains a valid UTF16 , ((== (Right t :: Either E.UnicodeException Text)) $@@ -49,6 +49,6 @@ evaluate . E.decodeUtf16LEWith E.strictDecode . LB.toStrict . SBB.toLazyByteString . mconcat . map SBB.word16LE $- A.toList arr off len) <?!>+ A.toList arr off len) <?@> "The bytes can correctly be decoded as UTF16." ]
validity-text.cabal view
@@ -1,30 +1,38 @@-name: validity-text-version: 0.2.0.0-cabal-version: >=1.10-build-type: Simple-license: MIT-license-file: LICENSE-copyright: Copyright: (c) 2016 Tom Sydney Kerckhove-maintainer: syd.kerckhove@gmail.com-homepage: https://github.com/NorfairKing/validity#readme-synopsis: Validity instances for text-description:- Please see README.md-category: Web-author: Tom Sydney Kerckhove+-- This file has been generated from package.yaml by hpack version 0.20.0.+--+-- see: https://github.com/sol/hpack+--+-- hash: 66d567970429991c7e4fb8b53812a651f3021bf8947373e7ed3f41d45334976a +name: validity-text+version: 0.2.0.1+synopsis: Validity instances for text+description: Please see README.md+category: Web+homepage: https://github.com/NorfairKing/validity#readme+bug-reports: https://github.com/NorfairKing/validity/issues+author: Tom Sydney Kerckhove+maintainer: syd.kerckhove@gmail.com+copyright: Copyright: (c) 2016 Tom Sydney Kerckhove+license: MIT+license-file: LICENSE+build-type: Simple+cabal-version: >= 1.10+ source-repository head- type: git- location: https://github.com/NorfairKing/validity+ type: git+ location: https://github.com/NorfairKing/validity library- exposed-modules:- Data.Validity.Text- build-depends:- base >=4.7 && <5,- validity >=0.4 && <0.5,- text -any,- bytestring -any- default-language: Haskell2010- hs-source-dirs: src-+ hs-source-dirs:+ src+ build-depends:+ base >=4.7 && <5+ , bytestring+ , text+ , validity >=0.4 && <0.5+ exposed-modules:+ Data.Validity.Text+ other-modules:+ Paths_validity_text+ default-language: Haskell2010