From 5e6912bb52efd60602ed1b01f95a84f2f3c55e16 Mon Sep 17 00:00:00 2001 From: Pierre Le Marre Date: Thu, 7 Jul 2022 19:35:59 +0200 Subject: [PATCH] Fixes (cabal, stack, pattern synonym) --- .../Internal/Char/DerivedNormalizationProperties.hs | 7 +++++-- stack.yaml | 7 ++++++- ucd2haskell/Parser/Text.hs | 7 +++++-- ucd2haskell/ucd2haskell.cabal | 2 +- unicode-transforms.cabal | 1 - 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Data/Unicode/Internal/Char/DerivedNormalizationProperties.hs b/Data/Unicode/Internal/Char/DerivedNormalizationProperties.hs index 43d991f..18aa072 100644 --- a/Data/Unicode/Internal/Char/DerivedNormalizationProperties.hs +++ b/Data/Unicode/Internal/Char/DerivedNormalizationProperties.hs @@ -12,7 +12,8 @@ module Data.Unicode.Internal.Char.DerivedNormalizationProperties ( pattern YesStarter , pattern MaybeStarterNoDecomp -, pattern Decomposable, pattern Combining +, pattern Decomposable +, pattern Combining , isNFKC_QC, isNFKD_QC, isNFC_QC, isNFD_QC) where @@ -25,8 +26,10 @@ pattern MaybeStarterNoDecomp = 2 pattern YesStarter :: Int pattern YesStarter = 3 -pattern Decomposable, Combining :: Int +pattern Decomposable :: Int pattern Decomposable = 0 + +pattern Combining :: Int pattern Combining = 1 {-# INLINE isNFKC_QC #-} diff --git a/stack.yaml b/stack.yaml index 1575d69..429cb7d 100644 --- a/stack.yaml +++ b/stack.yaml @@ -2,7 +2,12 @@ packages: - '.' resolver: lts-18.18 extra-deps: -- unicode-data-0.2.0 +# [TODO] re-enable once unicode-data is released with quick check +# - unicode-data-XXX +- git: https://github.com/composewell/unicode-data.git + commit: dffcca331e4c8479c75983cfc8ce2591e9bad601 + subdirs: + - unicode-data - tasty-bench-0.3 # Look at https://stackoverflow.com/questions/70045586/could-not-find-module-system-console-mintty-win32-when-compiling-test-framework diff --git a/ucd2haskell/Parser/Text.hs b/ucd2haskell/Parser/Text.hs index 72a2c4b..9fc61bb 100644 --- a/ucd2haskell/Parser/Text.hs +++ b/ucd2haskell/Parser/Text.hs @@ -210,7 +210,8 @@ genNormalizationPropertiesModule moduleName = , "( pattern YesStarter" -- , ", pattern MaybeCombiningStarter, pattern MaybeStarterNoDecomp" , ", pattern MaybeStarterNoDecomp" - , ", pattern Decomposable, pattern Combining" + , ", pattern Decomposable" + , ", pattern Combining" -- , "( pattern Decomposable, pattern Combining, pattern CombiningStarter" -- , ", pattern Starter, pattern Stable" , ", " <> mconcat (intersperse ", " (prop2FuncName <$> exports)) <> ")" @@ -239,8 +240,10 @@ genNormalizationPropertiesModule moduleName = , "pattern YesStarter = " <> show yesStarter -- , "pattern YesStable = " <> show yesStable , "" - , "pattern Decomposable, Combining :: Int" + , "pattern Decomposable :: Int" , "pattern Decomposable = " <> show decomposable + , "" + , "pattern Combining :: Int" , "pattern Combining = " <> show combining , "" , mconcat bitmaps diff --git a/ucd2haskell/ucd2haskell.cabal b/ucd2haskell/ucd2haskell.cabal index 1a5f4bf..a7322b7 100644 --- a/ucd2haskell/ucd2haskell.cabal +++ b/ucd2haskell/ucd2haskell.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.4 +cabal-version: 3.0 name: ucd2haskell version: 0.1.0.0 -- synopsis: diff --git a/unicode-transforms.cabal b/unicode-transforms.cabal index 3a40a3d..1b99c29 100644 --- a/unicode-transforms.cabal +++ b/unicode-transforms.cabal @@ -28,7 +28,6 @@ extra-source-files: MAINTAINING.md NOTES.md README.md - download-ucd-files.sh benchmark/README.md benchmark/NormalizeFile.hs benchmark/data/AllChars.txt