File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed
Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 33## 0.3.0 (December 2021)
44
55- Support for big-endian architectures.
6+ - Added ` unicodeVersion ` .
67- Added ` GeneralCategory ` data type and corresponding ` generalCategoryAbbr ` ,
78 ` generalCategory ` functions.
89- Added the following functions to ` Unicode.Char.General ` :
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ module Unicode.Char
3232 , module Unicode.Char.Numeric
3333 , module Unicode.Char.Normalization
3434 , module Unicode.Char.Identifiers
35+ , unicodeVersion
3536
3637 -- * Re-export
3738 , ord
@@ -40,9 +41,16 @@ module Unicode.Char
4041where
4142
4243import Data.Char (chr , ord )
44+ import Data.Version (Version , makeVersion )
4345import Unicode.Char.Case
4446import Unicode.Char.General
4547import Unicode.Char.General.Compat
4648import Unicode.Char.Identifiers
4749import Unicode.Char.Numeric
4850import Unicode.Char.Normalization
51+
52+ -- | Version of Unicode standard used by @unicode-data@.
53+ --
54+ -- @since 0.3.0
55+ unicodeVersion :: Version
56+ unicodeVersion = makeVersion [14 , 0 , 0 ]
Original file line number Diff line number Diff line change @@ -53,8 +53,9 @@ download_files() {
5353 done
5454}
5555
56- # Compile and run ucd2haskell
56+ # Generate the Haskell files.
5757run_generator () {
58+ # Compile and run ucd2haskell
5859 cabal run --flag ucd2haskell ucd2haskell -- \
5960 --input ./ucd/ \
6061 --output ./lib/ \
@@ -68,6 +69,9 @@ run_generator() {
6869 --core-prop XID_Continue \
6970 --core-prop Pattern_Syntax \
7071 --core-prop Pattern_White_Space
72+ # Update unicodeVersion in Unicode.Char
73+ VERSION_AS_LIST=$( echo " $VERSION " | sed " s/\./, /g" )
74+ sed -ri " s/^(unicodeVersion = makeVersion \[)[^]]*\]/\1$VERSION_AS_LIST \]/" " lib/Unicode/Char.hs"
7175}
7276
7377# Print help text
You can’t perform that action at this time.
0 commit comments