unicode-data-names 0.1.0 → 0.2.0
raw patch · 7 files changed
+25/−18 lines, 7 filesdep ~basedep ~hspecdep ~unicode-data
Dependency ranges changed: base, hspec, unicode-data
Files
- Changelog.md +4/−0
- README.md +1/−1
- lib/Unicode/Char/General/Names.hs +2/−2
- lib/Unicode/Internal/Char/UnicodeData/DerivedName.hs too large to diff
- lib/Unicode/Internal/Char/UnicodeData/NameAliases.hs +5/−3
- test/Unicode/Char/General/NamesSpec.hs +3/−3
- unicode-data-names.cabal +10/−9
Changelog.md view
@@ -1,5 +1,9 @@ # Changelog +## 0.2.0 (September 2022)++- Update to [Unicode 15.0.0](https://www.unicode.org/versions/Unicode15.0.0/).+ ## 0.1.0 (June 2022) - Initial release
README.md view
@@ -7,7 +7,7 @@ The Haskell data structures are generated programmatically from the Unicode character database (UCD) files. The latest Unicode version supported by this library is-[`14.0.0`](https://www.unicode.org/versions/Unicode14.0.0/).+[`15.0.0`](https://www.unicode.org/versions/Unicode15.0.0/). Please see the [Haddock documentation](https://hackage.haskell.org/package/unicode-data-names)
lib/Unicode/Char/General/Names.hs view
@@ -6,7 +6,7 @@ -- Stability : experimental -- -- Unicode character names and name aliases.--- See Unicode standard 14.0.0, section 4.8.+-- See Unicode standard 15.0.0, section 4.8. -- -- @since 0.1.0 @@ -84,7 +84,7 @@ = fmap (fmap (fmap unpack)) . NameAliases.nameAliasesWithTypes --- Note: names are ASCII. See Unicode Standard 14.0.0, section 4.8.+-- Note: names are ASCII. See Unicode Standard 15.0.0, section 4.8. {-# INLINE unpack #-} unpack :: CString -> String unpack = unsafePerformIO . peekCAString
lib/Unicode/Internal/Char/UnicodeData/DerivedName.hs view
file too large to diff
lib/Unicode/Internal/Char/UnicodeData/NameAliases.hs view
@@ -1,4 +1,4 @@--- autogenerated from https://www.unicode.org/Public/14.0.0/ucd/NameAliases.txt+-- autogenerated from https://www.unicode.org/Public/15.0.0/ucd/NameAliases.txt -- | -- Module : Unicode.Internal.Char.UnicodeData.NameAliases -- Copyright : (c) 2022 Composewell Technologies and Contributors@@ -17,7 +17,7 @@ import Foreign.C.String (CString) import GHC.Exts (Ptr(..)) --- | Type of name alias. See Unicode Standard 14.0.0, section 4.8.+-- | Type of name alias. See Unicode Standard 15.0.0, section 4.8. -- -- @since 0.1.0 data NameAliasType@@ -86,7 +86,7 @@ '\x0016' -> [(Control,[Ptr "SYNCHRONOUS IDLE\0"#]),(Abbreviation,[Ptr "SYN\0"#])] '\x0017' -> [(Control,[Ptr "END OF TRANSMISSION BLOCK\0"#]),(Abbreviation,[Ptr "ETB\0"#])] '\x0018' -> [(Control,[Ptr "CANCEL\0"#]),(Abbreviation,[Ptr "CAN\0"#])]- '\x0019' -> [(Control,[Ptr "END OF MEDIUM\0"#]),(Abbreviation,[Ptr "EOM\0"#])]+ '\x0019' -> [(Control,[Ptr "END OF MEDIUM\0"#]),(Abbreviation,[Ptr "EOM\0"#,Ptr "EM\0"#])] '\x001a' -> [(Control,[Ptr "SUBSTITUTE\0"#]),(Abbreviation,[Ptr "SUB\0"#])] '\x001b' -> [(Control,[Ptr "ESCAPE\0"#]),(Abbreviation,[Ptr "ESC\0"#])] '\x001c' -> [(Control,[Ptr "INFORMATION SEPARATOR FOUR\0"#,Ptr "FILE SEPARATOR\0"#]),(Abbreviation,[Ptr "FS\0"#])]@@ -132,6 +132,7 @@ '\x01a2' -> [(Correction,[Ptr "LATIN CAPITAL LETTER GHA\0"#])] '\x01a3' -> [(Correction,[Ptr "LATIN SMALL LETTER GHA\0"#])] '\x034f' -> [(Abbreviation,[Ptr "CGJ\0"#])]+ '\x0616' -> [(Correction,[Ptr "ARABIC SMALL HIGH LIGATURE ALEF WITH YEH BARREE\0"#])] '\x061c' -> [(Abbreviation,[Ptr "ALM\0"#])] '\x0709' -> [(Correction,[Ptr "SYRIAC SUBLINEAR COLON SKEWED LEFT\0"#])] '\x0cde' -> [(Correction,[Ptr "KANNADA LETTER LLLA\0"#])]@@ -149,6 +150,7 @@ '\x180d' -> [(Abbreviation,[Ptr "FVS3\0"#])] '\x180e' -> [(Abbreviation,[Ptr "MVS\0"#])] '\x180f' -> [(Abbreviation,[Ptr "FVS4\0"#])]+ '\x1bbd' -> [(Correction,[Ptr "SUNDANESE LETTER ARCHAIC I\0"#])] '\x200b' -> [(Abbreviation,[Ptr "ZWSP\0"#])] '\x200c' -> [(Abbreviation,[Ptr "ZWNJ\0"#])] '\x200d' -> [(Abbreviation,[Ptr "ZWJ\0"#])]
test/Unicode/Char/General/NamesSpec.hs view
@@ -28,7 +28,7 @@ name '\x1f41d' `shouldBe` Just "HONEYBEE" -- Name generated using pattern (example from UCD file) name '\x2f89f' `shouldBe` Just "CJK COMPATIBILITY IDEOGRAPH-2F89F"- -- Last name defined, as of Unicode 14.0.0+ -- Last name defined, as of Unicode 15.0.0 name '\xe01ef' `shouldBe` Just "VARIATION SELECTOR-256" name maxBound `shouldBe` Nothing it "correctedName: Test some characters" do@@ -48,7 +48,7 @@ correctedName '\x1f41d' `shouldBe` Just "HONEYBEE" -- Name generated using pattern (example from UCD file) correctedName '\x2f89f' `shouldBe` Just "CJK COMPATIBILITY IDEOGRAPH-2F89F"- -- Last name defined, as of Unicode 14.0.0+ -- Last name defined, as of Unicode 15.0.0 correctedName '\xe01ef' `shouldBe` Just "VARIATION SELECTOR-256" correctedName maxBound `shouldBe` Nothing it "nameOrAlias: Test some characters" do@@ -68,7 +68,7 @@ nameOrAlias '\x1f41d' `shouldBe` Just "HONEYBEE" -- Name generated using pattern (example from UCD file) nameOrAlias '\x2f89f' `shouldBe` Just "CJK COMPATIBILITY IDEOGRAPH-2F89F"- -- Last name defined, as of Unicode 14.0.0+ -- Last name defined, as of Unicode 15.0.0 nameOrAlias '\xe01ef' `shouldBe` Just "VARIATION SELECTOR-256" nameOrAlias maxBound `shouldBe` Nothing it "Every defined character has at least a name or an alias" do
unicode-data-names.cabal view
@@ -1,15 +1,15 @@ cabal-version: 2.2 name: unicode-data-names-version: 0.1.0+version: 0.2.0 synopsis: Unicode characters names and aliases description: @unicode-data-names@ provides Haskell APIs to access the Unicode character /names and aliases/ from the <https://www.unicode.org/ucd/ Unicode character database> (UCD). .- The Haskell data structures are generated programmatically from the UCD.+ The Haskell data structures are generated programmatically from the UCD files. The latest Unicode version supported by this library is- @<https://www.unicode.org/versions/Unicode14.0.0/ 14.0.0>@.+ @<https://www.unicode.org/versions/Unicode15.0.0/ 15.0.0>@. homepage: http://github.com/composewell/unicode-data bug-reports: https://github.com/composewell/unicode-data/issues license: Apache-2.0@@ -28,6 +28,7 @@ , GHC==8.10.7 , GHC==9.0.1 , GHC==9.2.1+ , GHC==9.4.2 extra-source-files: Changelog.md@@ -82,7 +83,7 @@ hs-source-dirs: lib build-depends:- base >= 4.7 && < 4.17+ base >= 4.7 && < 4.18 test-suite test import: default-extensions, compile-options@@ -93,12 +94,12 @@ other-modules: Unicode.Char.General.NamesSpec build-depends:- base >= 4.7 && < 4.17- , hspec >= 2.0 && < 2.10- , unicode-data+ base >= 4.7 && < 4.18+ , hspec >= 2.0 && < 2.11+ , unicode-data >= 0.4 && < 0.5 , unicode-data-names build-tool-depends:- hspec-discover:hspec-discover >= 2.0 && < 2.10+ hspec-discover:hspec-discover >= 2.0 && < 2.11 default-language: Haskell2010 executable export-all-chars@@ -122,7 +123,7 @@ hs-source-dirs: bench main-is: Main.hs build-depends:- base >= 4.7 && < 4.17,+ base >= 4.7 && < 4.18, deepseq >= 1.1 && < 1.5, tasty-bench >= 0.2.5 && < 0.4, tasty >= 1.4.1,