unicode-data-names 0.4.0 → 0.5.0
raw patch · 11 files changed
+64/−19 lines, 11 filesdep ~basedep ~tasty-benchdep ~unicode-data
Dependency ranges changed: base, tasty-bench, unicode-data
Files
- Changelog.md +4/−0
- README.md +1/−1
- lib/Unicode/Char/General/Names.hs +12/−0
- lib/Unicode/Char/General/Names/ByteString.hs +9/−0
- lib/Unicode/Char/General/Names/Text.hs +9/−0
- lib/Unicode/Internal/Char/Names/Version.hs +2/−2
- lib/Unicode/Internal/Char/UnicodeData/DerivedName.hs too large to diff
- lib/Unicode/Internal/Char/UnicodeData/NameAliases.hs +5/−1
- test/ICU/NamesSpec.hs +4/−0
- test/Unicode/Char/General/NamesSpec.hs +5/−2
- unicode-data-names.cabal +13/−13
Changelog.md view
@@ -1,5 +1,9 @@ # Changelog +## 0.5.0 (September 2025)++- Updated to [Unicode 16.0.0](https://www.unicode.org/versions/Unicode16.0.0/).+ ## 0.4.0 (July 2024) - Updated to [Unicode 15.1.0](https://www.unicode.org/versions/Unicode15.1.0/).
README.md view
@@ -12,7 +12,7 @@ The Haskell data structures are generated programmatically from the Unicode character database (UCD) files. The latest Unicode version supported by this library is-[`15.1.0`](https://www.unicode.org/versions/Unicode15.1.0/).+[`16.0.0`](https://www.unicode.org/versions/Unicode16.0.0/). Please see the [Haddock documentation](https://hackage.haskell.org/package/unicode-data-names)
lib/Unicode/Char/General/Names.hs view
@@ -80,6 +80,18 @@ where !hex = showHex c# !n = 'T':'A':'N':'G':'U':'T':' ':'I':'D':'E':'O':'G':'R':'A':'P':'H':'-':hex+ DerivedName.EgyptianHieroglyph -> Just n+ where+ !hex = showHex c#+ !n = 'E':'G':'Y':'P':'T':'I':'A':'N':' ':'H':'I':'E':'R':'O':'G':'L':'Y':'P':'H':'-':hex+ DerivedName.KhitanSmallScript -> Just n+ where+ !hex = showHex c#+ !n = 'K':'H':'I':'T':'A':'N':' ':'S':'M':'A':'L':'L':' ':'S':'C':'R':'I':'P':'T':' ':'C':'H':'A':'R':'A':'C':'T':'E':'R':'-':hex+ DerivedName.NushuCharacter -> Just n+ where+ !hex = showHex c#+ !n = 'N':'U':'S':'H':'U':' ':'C':'H':'A':'R':'A':'C':'T':'E':'R':'-':hex _ | isTrue# (len# <# DerivedName.HangulSyllable) -> let !n = unpack name# [] len# in Just n | otherwise ->
lib/Unicode/Char/General/Names/ByteString.hs view
@@ -62,6 +62,15 @@ DerivedName.TangutIdeograph -> Just n where !n = mkNameFromTemplate# "TANGUT IDEOGRAPH-"# 17# (ord# c#)+ DerivedName.EgyptianHieroglyph -> Just n+ where+ !n = mkNameFromTemplate# "EGYPTIAN HIEROGLYPH-"# 20# (ord# c#)+ DerivedName.KhitanSmallScript -> Just n+ where+ !n = mkNameFromTemplate# "KHITAN SMALL SCRIPT CHARACTER-"# 30# (ord# c#)+ DerivedName.NushuCharacter -> Just n+ where+ !n = mkNameFromTemplate# "NUSHU CHARACTER-"# 16# (ord# c#) _ | isTrue# (len# <# DerivedName.HangulSyllable) -> let !n = unpackAddr# name# len#
lib/Unicode/Char/General/Names/Text.hs view
@@ -54,6 +54,15 @@ DerivedName.TangutIdeograph -> Just n where !n = mkNameFromTemplate "TANGUT IDEOGRAPH-"# 17# (ord# c#)+ DerivedName.EgyptianHieroglyph -> Just n+ where+ !n = mkNameFromTemplate "EGYPTIAN HIEROGLYPH-"# 20# (ord# c#)+ DerivedName.KhitanSmallScript -> Just n+ where+ !n = mkNameFromTemplate "KHITAN SMALL SCRIPT CHARACTER-"# 30# (ord# c#)+ DerivedName.NushuCharacter -> Just n+ where+ !n = mkNameFromTemplate "NUSHU CHARACTER-"# 16# (ord# c#) _ | isTrue# (len# <# DerivedName.HangulSyllable) -> let !n = unpackAddr# name# len#
lib/Unicode/Internal/Char/Names/Version.hs view
@@ -13,8 +13,8 @@ import Data.Version (Version, makeVersion) -- | Version of the Unicode standard used by this package:--- [15.1.0](https://www.unicode.org/versions/Unicode15.1.0/).+-- [16.0.0](https://www.unicode.org/versions/Unicode16.0.0/). -- -- @since 0.3.0 unicodeVersion :: Version-unicodeVersion = makeVersion [15,1,0]+unicodeVersion = makeVersion [16,0,0]
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/15.1.0/ucd/NameAliases.txt+-- autogenerated from https://www.unicode.org/Public/16.0.0/ucd/NameAliases.txt -- | -- Module : Unicode.Internal.Char.UnicodeData.NameAliases -- Copyright : (c) 2022 Composewell Technologies and Contributors@@ -197,12 +197,16 @@ '\xFEFF'# -> "\0\0\5\0\22\15BYTE ORDER MARK\0\3BOM\6ZWNBSP\0\0"# '\x122D4'# -> "\5\0\0\0\0\24CUNEIFORM SIGN NU11 TENU\0\0"# '\x122D5'# -> "\5\0\0\0\0\42CUNEIFORM SIGN NU11 OVER NU11 BUR OVER BUR\0\0"#+ '\x12327'# -> "\5\0\0\0\0\20CUNEIFORM SIGN KALAM\0\0"#+ '\x1680B'# -> "\5\0\0\0\0\30BAMUM LETTER PHASE-A MAEMGBIEE\0\0"# '\x16E56'# -> "\5\0\0\0\0\28MEDEFAIDRIN CAPITAL LETTER H\0\0"# '\x16E57'# -> "\5\0\0\0\0\29MEDEFAIDRIN CAPITAL LETTER NG\0\0"# '\x16E76'# -> "\5\0\0\0\0\26MEDEFAIDRIN SMALL LETTER H\0\0"# '\x16E77'# -> "\5\0\0\0\0\27MEDEFAIDRIN SMALL LETTER NG\0\0"# '\x1B001'# -> "\5\0\0\0\0\21HENTAIGANA LETTER E-1\0\0"# '\x1D0C5'# -> "\5\0\0\0\0\52BYZANTINE MUSICAL SYMBOL FTHORA SKLIRON CHROMA VASIS\0\0"#+ '\x1E899'# -> "\5\0\0\0\0\31MENDE KIKAKUI SYLLABLE M172 MBO\0\0"#+ '\x1E89A'# -> "\5\0\0\0\0\32MENDE KIKAKUI SYLLABLE M174 MBOO\0\0"# '\xE0100'# -> "\0\0\0\0\5\4VS17\0\0"# '\xE0101'# -> "\0\0\0\0\5\4VS18\0\0"# '\xE0102'# -> "\0\0\0\0\5\4VS19\0\0"#
test/ICU/NamesSpec.hs view
@@ -57,6 +57,8 @@ #endif where ourUnicodeVersion = versionBranch U.unicodeVersion+ theirUnicodeVersion = take 3 (versionBranch ICU.unicodeVersion)+ versionMismatch = ourUnicodeVersion /= theirUnicodeVersion showCodePoint c = ("U+" ++) . fmap U.toUpper . showHex (U.ord c) -- There is no feature to display warnings other than `trace`, so@@ -85,6 +87,8 @@ -- Unicode version mismatch: char is not mapped in one of the libs: -- add warning. | ageMismatch c = acc{warnings=c : warnings acc}+ -- Unicode version mismatch+ | versionMismatch = acc{warnings=c : warnings acc} -- Error | otherwise = let !msg = mconcat
test/Unicode/Char/General/NamesSpec.hs view
@@ -50,9 +50,12 @@ -- Name with correction name '\x1D0C5' `shouldBe` Just "BYZANTINE MUSICAL SYMBOL FHTORA SKLIRON CHROMA VASIS" name '\x1f41d' `shouldBe` Just "HONEYBEE"- -- Name generated using pattern (example from UCD file)+ -- Names generated using pattern (example from UCD file)+ name '\x13460' `shouldBe` Just "EGYPTIAN HIEROGLYPH-13460"+ name '\x18B00' `shouldBe` Just "KHITAN SMALL SCRIPT CHARACTER-18B00"+ name '\x18CFF' `shouldBe` Just "KHITAN SMALL SCRIPT CHARACTER-18CFF" name '\x2f89f' `shouldBe` Just "CJK COMPATIBILITY IDEOGRAPH-2F89F"- -- Last name defined, as of Unicode 15.0.0+ -- Last name defined, as of Unicode 16.0.0 name '\xe01ef' `shouldBe` Just "VARIATION SELECTOR-256" name maxBound `shouldBe` Nothing it "correctedName: Test some characters" do
unicode-data-names.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: unicode-data-names-version: 0.4.0+version: 0.5.0 synopsis: Unicode characters names and aliases description: @unicode-data-names@ provides Haskell APIs to access the Unicode@@ -9,7 +9,7 @@ . 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/Unicode15.1.0/ 15.1.0>@.+ @<https://www.unicode.org/versions/Unicode16.0.0/ 16.0.0>@. homepage: http://github.com/composewell/unicode-data bug-reports: https://github.com/composewell/unicode-data/issues license: Apache-2.0@@ -20,8 +20,7 @@ category: Data,Text,Unicode stability: Experimental build-type: Simple-tested-with: GHC==8.0.2- , GHC==8.2.2+tested-with: GHC==8.2.2 , GHC==8.4.4 , GHC==8.6.5 , GHC==8.8.4@@ -30,8 +29,9 @@ , GHC==9.2.8 , GHC==9.4.8 , GHC==9.6.5- , GHC==9.8.2- , GHC==9.10.1+ , GHC==9.8.4+ , GHC==9.10.2+ , GHC==9.12.2 extra-doc-files: Changelog.md@@ -104,8 +104,8 @@ hs-source-dirs: lib build-depends:- base >= 4.7 && < 4.21,- unicode-data >= 0.6 && < 0.7+ base >= 4.7 && < 4.23,+ unicode-data >= 0.7 && < 0.8 -- Support for raw string literals unpacking is included in base ≥ 4.15 if impl(ghc < 9.0.0) build-depends:@@ -130,9 +130,9 @@ other-modules: Unicode.Char.General.NamesSpec build-depends:- base >= 4.7 && < 4.21+ base >= 4.7 && < 4.23 , hspec >= 2.0 && < 2.12- , unicode-data >= 0.6 && < 0.7+ , unicode-data >= 0.7 && < 0.8 , unicode-data-names if flag(has-text) cpp-options: -DHAS_TEXT@@ -173,11 +173,11 @@ hs-source-dirs: bench main-is: Main.hs build-depends:- base >= 4.7 && < 4.21,+ base >= 4.7 && < 4.23, deepseq >= 1.1 && < 1.6,- tasty-bench >= 0.2.5 && < 0.4,+ tasty-bench >= 0.2.5 && < 0.5, tasty >= 1.4.1 && < 1.6,- unicode-data >= 0.6 && < 0.7,+ unicode-data >= 0.7 && < 0.8, unicode-data-names if flag(has-text) cpp-options: -DHAS_TEXT