diff --git a/ucd2haskell/exe/UCD2Haskell/Generator/Names.hs b/ucd2haskell/exe/UCD2Haskell/Generator/Names.hs index 438bf54d..3a0d6443 100644 --- a/ucd2haskell/exe/UCD2Haskell/Generator/Names.hs +++ b/ucd2haskell/exe/UCD2Haskell/Generator/Names.hs @@ -15,6 +15,7 @@ import qualified Unicode.CharacterDatabase.Parser.NameAliases as NA import qualified UCD2Haskell.Modules.UnicodeData.DerivedNames as Names import qualified UCD2Haskell.Modules.UnicodeData.NameAliases as NameAliases +import qualified UCD2Haskell.Modules.Version as Version import UCD2Haskell.Generator (runGenerator) generateModules :: Version -> FilePath -> FilePath -> IO () @@ -34,3 +35,9 @@ generateModules version indir outdir = do NA.parse outdir [ NameAliases.recipe ] + + Version.writeModule + version + outdir + "Unicode.Internal.Char.Names.Version" + "0.3.0" diff --git a/ucd2haskell/exe/UCD2Haskell/Generator/Scripts.hs b/ucd2haskell/exe/UCD2Haskell/Generator/Scripts.hs index be39b399..65935d7a 100644 --- a/ucd2haskell/exe/UCD2Haskell/Generator/Scripts.hs +++ b/ucd2haskell/exe/UCD2Haskell/Generator/Scripts.hs @@ -15,6 +15,7 @@ import qualified Unicode.CharacterDatabase.Parser.Properties.Single as Prop import qualified UCD2Haskell.Modules.Scripts as Scripts import qualified UCD2Haskell.Modules.ScriptsExtensions as ScriptsExtensions +import qualified UCD2Haskell.Modules.Version as Version import UCD2Haskell.Generator (runGenerator) generateModules :: Version -> FilePath -> FilePath -> IO () @@ -33,3 +34,9 @@ generateModules version indir outdir = do outdir [ Scripts.recipe scriptAliases , ScriptsExtensions.recipe scriptAliases extensions ] + + Version.writeModule + version + outdir + "Unicode.Internal.Char.Scripts.Version" + "0.2.1" diff --git a/ucd2haskell/exe/UCD2Haskell/Generator/Security.hs b/ucd2haskell/exe/UCD2Haskell/Generator/Security.hs index 1fd98933..44bd8afb 100644 --- a/ucd2haskell/exe/UCD2Haskell/Generator/Security.hs +++ b/ucd2haskell/exe/UCD2Haskell/Generator/Security.hs @@ -15,6 +15,7 @@ import qualified UCD2Haskell.Modules.Security.Confusables as Confusables import qualified UCD2Haskell.Modules.Security.IdentifierStatus as IdentifierStatus import qualified UCD2Haskell.Modules.Security.IdentifierType as IdentifierType import qualified UCD2Haskell.Modules.Security.IntentionalConfusables as IntentionalConfusables +import qualified UCD2Haskell.Modules.Version as Version import UCD2Haskell.Generator (runGenerator) generateModules :: Version -> FilePath -> FilePath -> IO () @@ -50,3 +51,9 @@ generateModules version indir outdir = do Prop.parse outdir [IntentionalConfusables.recipe] + + Version.writeModule + version + outdir + "Unicode.Internal.Char.Security.Version" + "0.2.1" diff --git a/unicode-data-names/Changelog.md b/unicode-data-names/Changelog.md index a126ae56..580cb7ce 100644 --- a/unicode-data-names/Changelog.md +++ b/unicode-data-names/Changelog.md @@ -1,12 +1,13 @@ # Changelog -## 0.3.0 TDB +## 0.3.0 TBD - Improve performance. - Added opional support for `ByteString` API. Use the package flag `has-bytestring` to enable it. - Added opional support for `Text` API. Use the package flag `has-text` to enable it. +- Add `unicodeVersion` to `Unicode.Char.General.Names`. ## 0.2.0 (September 2022) diff --git a/unicode-data-names/lib/Unicode/Char/General/Names.hs b/unicode-data-names/lib/Unicode/Char/General/Names.hs index a7856838..aa242616 100644 --- a/unicode-data-names/lib/Unicode/Char/General/Names.hs +++ b/unicode-data-names/lib/Unicode/Char/General/Names.hs @@ -16,8 +16,10 @@ -- @since 0.1.0 module Unicode.Char.General.Names - ( -- * Name - name + ( -- Unicode version + unicodeVersion + -- * Name + , name , nameOrAlias , correctedName -- * Name Aliases @@ -36,6 +38,7 @@ import GHC.Exts import Unicode.Internal.Bits.Names (unpackNBytes#) import qualified Unicode.Internal.Char.UnicodeData.DerivedName as DerivedName import qualified Unicode.Internal.Char.UnicodeData.NameAliases as NameAliases +import Unicode.Internal.Char.Names.Version (unicodeVersion) -- | Name of a character, if defined. -- diff --git a/unicode-data-names/lib/Unicode/Internal/Char/Names/Version.hs b/unicode-data-names/lib/Unicode/Internal/Char/Names/Version.hs new file mode 100644 index 00000000..9e5244b1 --- /dev/null +++ b/unicode-data-names/lib/Unicode/Internal/Char/Names/Version.hs @@ -0,0 +1,20 @@ +-- DO NOT EDIT MANUALLY: autogenerated by ucd2haskell +{-# OPTIONS_HADDOCK hide #-} + +-- | +-- Module : Unicode.Internal.Char.Names.Version +-- Copyright : (c) 2024 Composewell Technologies and Contributors +-- License : Apache-2.0 +-- Maintainer : streamly@composewell.com +-- Stability : experimental + +module Unicode.Internal.Char.Names.Version (unicodeVersion) where + +import Data.Version (Version, makeVersion) + +-- | Version of the Unicode standard used by this package: +-- [15.0.0](https://www.unicode.org/versions/Unicode15.0.0/). +-- +-- @since 0.3.0 +unicodeVersion :: Version +unicodeVersion = makeVersion [15,0,0] diff --git a/unicode-data-names/unicode-data-names.cabal b/unicode-data-names/unicode-data-names.cabal index 8bb444ec..c7b9d7d2 100644 --- a/unicode-data-names/unicode-data-names.cabal +++ b/unicode-data-names/unicode-data-names.cabal @@ -96,6 +96,7 @@ library -- the properties are generated. Unicode.Internal.Char.UnicodeData.DerivedName Unicode.Internal.Char.UnicodeData.NameAliases + Unicode.Internal.Char.Names.Version other-modules: -- Internal files Unicode.Internal.Bits.Names diff --git a/unicode-data-scripts/Changelog.md b/unicode-data-scripts/Changelog.md index 22919687..0d0f359b 100644 --- a/unicode-data-scripts/Changelog.md +++ b/unicode-data-scripts/Changelog.md @@ -1,5 +1,9 @@ # Changelog +## 0.2.1 TBD + +* Add `unicodeVersion` to `Unicode.Char.General.Scripts`. + ## 0.2.0.1 (December 2022) - Fix [Unicode scripts handling on big-endian architectures](https://github.com/composewell/unicode-data/issues/97). diff --git a/unicode-data-scripts/lib/Unicode/Char/General/Scripts.hs b/unicode-data-scripts/lib/Unicode/Char/General/Scripts.hs index 7883757a..7e7d139b 100644 --- a/unicode-data-scripts/lib/Unicode/Char/General/Scripts.hs +++ b/unicode-data-scripts/lib/Unicode/Char/General/Scripts.hs @@ -13,7 +13,10 @@ -- module Unicode.Char.General.Scripts - ( S.Script(..) + ( -- * Unicode version + unicodeVersion + -- * Scripts + , S.Script(..) , script , scriptExtensions , scriptDefinition @@ -37,6 +40,7 @@ import GHC.Exts (byteSwap32#, narrow32Word#) import qualified Unicode.Internal.Char.Scripts as S import qualified Unicode.Internal.Char.ScriptExtensions as S +import Unicode.Internal.Char.Scripts.Version (unicodeVersion) -- | Character [script](https://www.unicode.org/reports/tr24/). -- diff --git a/unicode-data-scripts/lib/Unicode/Internal/Char/Scripts/Version.hs b/unicode-data-scripts/lib/Unicode/Internal/Char/Scripts/Version.hs new file mode 100644 index 00000000..3d941ece --- /dev/null +++ b/unicode-data-scripts/lib/Unicode/Internal/Char/Scripts/Version.hs @@ -0,0 +1,20 @@ +-- DO NOT EDIT MANUALLY: autogenerated by ucd2haskell +{-# OPTIONS_HADDOCK hide #-} + +-- | +-- Module : Unicode.Internal.Char.Scripts.Version +-- Copyright : (c) 2024 Composewell Technologies and Contributors +-- License : Apache-2.0 +-- Maintainer : streamly@composewell.com +-- Stability : experimental + +module Unicode.Internal.Char.Scripts.Version (unicodeVersion) where + +import Data.Version (Version, makeVersion) + +-- | Version of the Unicode standard used by this package: +-- [15.0.0](https://www.unicode.org/versions/Unicode15.0.0/). +-- +-- @since 0.2.1 +unicodeVersion :: Version +unicodeVersion = makeVersion [15,0,0] diff --git a/unicode-data-scripts/unicode-data-scripts.cabal b/unicode-data-scripts/unicode-data-scripts.cabal index 11559e05..3d23c1d0 100644 --- a/unicode-data-scripts/unicode-data-scripts.cabal +++ b/unicode-data-scripts/unicode-data-scripts.cabal @@ -1,6 +1,6 @@ cabal-version: 2.2 name: unicode-data-scripts -version: 0.2.0.1 +version: 0.2.1 synopsis: Unicode characters scripts description: @unicode-data-scripts@ provides Haskell APIs to access the Unicode @@ -75,6 +75,7 @@ library -- the properties are generated. Unicode.Internal.Char.Scripts Unicode.Internal.Char.ScriptExtensions + Unicode.Internal.Char.Scripts.Version hs-source-dirs: lib build-depends: diff --git a/unicode-data-security/Changelog.md b/unicode-data-security/Changelog.md index 95028d8f..9d75216b 100644 --- a/unicode-data-security/Changelog.md +++ b/unicode-data-security/Changelog.md @@ -1,5 +1,9 @@ # Changelog +## 0.2.1 TBD + +- Add `unicodeVersion` to `Unicode.Char.Identifiers.Security`. + ## 0.2.0 (September 2022) - Update to [Unicode 15.0.0](https://www.unicode.org/versions/Unicode15.0.0/). diff --git a/unicode-data-security/lib/Unicode/Char/Identifiers/Security.hs b/unicode-data-security/lib/Unicode/Char/Identifiers/Security.hs index 4fd9041b..f1db55d1 100644 --- a/unicode-data-security/lib/Unicode/Char/Identifiers/Security.hs +++ b/unicode-data-security/lib/Unicode/Char/Identifiers/Security.hs @@ -11,8 +11,10 @@ -- @since 0.1.0 module Unicode.Char.Identifiers.Security - ( -- * Identifier status - isAllowedInIdentifier + ( -- * Unicode version + unicodeVersion + -- * Identifier status + , isAllowedInIdentifier -- * Identifier type , T.IdentifierType(..) @@ -37,6 +39,7 @@ import qualified Unicode.Internal.Char.Security.Confusables as C import qualified Unicode.Internal.Char.Security.IdentifierStatus as S import qualified Unicode.Internal.Char.Security.IdentifierType as T import qualified Unicode.Internal.Char.Security.IntentionalConfusables as IC +import Unicode.Internal.Char.Security.Version (unicodeVersion) -- | Returns 'True' if the given character is allowed in an identifier. -- diff --git a/unicode-data-security/lib/Unicode/Internal/Char/Security/Version.hs b/unicode-data-security/lib/Unicode/Internal/Char/Security/Version.hs new file mode 100644 index 00000000..eebe7b0a --- /dev/null +++ b/unicode-data-security/lib/Unicode/Internal/Char/Security/Version.hs @@ -0,0 +1,20 @@ +-- DO NOT EDIT MANUALLY: autogenerated by ucd2haskell +{-# OPTIONS_HADDOCK hide #-} + +-- | +-- Module : Unicode.Internal.Char.Security.Version +-- Copyright : (c) 2024 Composewell Technologies and Contributors +-- License : Apache-2.0 +-- Maintainer : streamly@composewell.com +-- Stability : experimental + +module Unicode.Internal.Char.Security.Version (unicodeVersion) where + +import Data.Version (Version, makeVersion) + +-- | Version of the Unicode standard used by this package: +-- [15.0.0](https://www.unicode.org/versions/Unicode15.0.0/). +-- +-- @since 0.2.1 +unicodeVersion :: Version +unicodeVersion = makeVersion [15,0,0] diff --git a/unicode-data-security/unicode-data-security.cabal b/unicode-data-security/unicode-data-security.cabal index 0726d114..bf900f68 100644 --- a/unicode-data-security/unicode-data-security.cabal +++ b/unicode-data-security/unicode-data-security.cabal @@ -1,6 +1,6 @@ cabal-version: 2.2 name: unicode-data-security -version: 0.2.0 +version: 0.2.1 synopsis: Unicode security mechanisms database description: @unicode-data-security@ provides Haskell APIs to access the @@ -77,6 +77,7 @@ library Unicode.Internal.Char.Security.IdentifierStatus Unicode.Internal.Char.Security.IdentifierType Unicode.Internal.Char.Security.IntentionalConfusables + Unicode.Internal.Char.Security.Version hs-source-dirs: lib build-depends: