From 778ccdff3f98f251d55bbe4288347c09be07712d Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Thu, 6 May 2021 18:41:49 +0100 Subject: [PATCH 1/4] Regenerate case mapping in accordance to Unicode 13.0 --- scripts/CaseMapping.hs | 2 +- src/Data/Text/Internal/Fusion/CaseMapping.hs | 266 +------------------ 2 files changed, 11 insertions(+), 257 deletions(-) diff --git a/scripts/CaseMapping.hs b/scripts/CaseMapping.hs index e6350ab8..4af11d90 100644 --- a/scripts/CaseMapping.hs +++ b/scripts/CaseMapping.hs @@ -8,7 +8,7 @@ import SpecialCasing main = do args <- getArgs let oname = case args of - [] -> "../Data/Text/Internal/Fusion/CaseMapping.hs" + [] -> "../src/Data/Text/Internal/Fusion/CaseMapping.hs" [o] -> o psc <- parseSC "SpecialCasing.txt" pcf <- parseCF "CaseFolding.txt" diff --git a/src/Data/Text/Internal/Fusion/CaseMapping.hs b/src/Data/Text/Internal/Fusion/CaseMapping.hs index 0ea4f1a5..f9fc4228 100644 --- a/src/Data/Text/Internal/Fusion/CaseMapping.hs +++ b/src/Data/Text/Internal/Fusion/CaseMapping.hs @@ -1,10 +1,10 @@ {-# LANGUAGE Rank2Types #-} -- AUTOMATICALLY GENERATED - DO NOT EDIT -- Generated by scripts/CaseMapping.hs --- CaseFolding-9.0.0.txt --- Date: 2016-03-02, 18:54:54 GMT --- SpecialCasing-9.0.0.txt --- Date: 2016-03-02, 18:55:13 GMT +-- CaseFolding-13.0.0.txt +-- Date: 2019-09-08, 23:30:59 GMT +-- SpecialCasing-13.0.0.txt +-- Date: 2019-09-08, 23:31:24 GMT module Data.Text.Internal.Fusion.CaseMapping where import Data.Char @@ -563,16 +563,12 @@ foldMapping '\x1ff6' s = Yield '\x03c9' (CC s '\x0342' '\x0000') foldMapping '\x1ff7' s = Yield '\x03c9' (CC s '\x0342' '\x03b9') -- GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI foldMapping '\x1ffc' s = Yield '\x03c9' (CC s '\x03b9' '\x0000') --- LATIN CAPITAL LETTER SMALL CAPITAL I -foldMapping '\xa7ae' s = Yield '\x026a' (CC s '\x0000' '\x0000') --- LATIN CAPITAL LETTER J WITH CROSSED-TAIL -foldMapping '\xa7b2' s = Yield '\x029d' (CC s '\x0000' '\x0000') --- LATIN CAPITAL LETTER CHI -foldMapping '\xa7b3' s = Yield '\xab53' (CC s '\x0000' '\x0000') --- LATIN CAPITAL LETTER BETA -foldMapping '\xa7b4' s = Yield '\xa7b5' (CC s '\x0000' '\x0000') --- LATIN CAPITAL LETTER OMEGA -foldMapping '\xa7b6' s = Yield '\xa7b7' (CC s '\x0000' '\x0000') +-- LATIN CAPITAL LETTER D WITH SHORT STROKE OVERLAY +foldMapping '\xa7c7' s = Yield '\xa7c8' (CC s '\x0000' '\x0000') +-- LATIN CAPITAL LETTER S WITH SHORT STROKE OVERLAY +foldMapping '\xa7c9' s = Yield '\xa7ca' (CC s '\x0000' '\x0000') +-- LATIN CAPITAL LETTER REVERSED HALF H +foldMapping '\xa7f5' s = Yield '\xa7f6' (CC s '\x0000' '\x0000') -- CHEROKEE SMALL LETTER A foldMapping '\xab70' s = Yield '\x13a0' (CC s '\x0000' '\x0000') -- CHEROKEE SMALL LETTER E @@ -757,246 +753,4 @@ foldMapping '\xfb15' s = Yield '\x0574' (CC s '\x056b' '\x0000') foldMapping '\xfb16' s = Yield '\x057e' (CC s '\x0576' '\x0000') -- ARMENIAN SMALL LIGATURE MEN XEH foldMapping '\xfb17' s = Yield '\x0574' (CC s '\x056d' '\x0000') --- OSAGE CAPITAL LETTER A -foldMapping '\x104b0' s = Yield '\x104d8' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER AI -foldMapping '\x104b1' s = Yield '\x104d9' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER AIN -foldMapping '\x104b2' s = Yield '\x104da' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER AH -foldMapping '\x104b3' s = Yield '\x104db' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER BRA -foldMapping '\x104b4' s = Yield '\x104dc' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER CHA -foldMapping '\x104b5' s = Yield '\x104dd' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER EHCHA -foldMapping '\x104b6' s = Yield '\x104de' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER E -foldMapping '\x104b7' s = Yield '\x104df' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER EIN -foldMapping '\x104b8' s = Yield '\x104e0' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER HA -foldMapping '\x104b9' s = Yield '\x104e1' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER HYA -foldMapping '\x104ba' s = Yield '\x104e2' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER I -foldMapping '\x104bb' s = Yield '\x104e3' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER KA -foldMapping '\x104bc' s = Yield '\x104e4' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER EHKA -foldMapping '\x104bd' s = Yield '\x104e5' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER KYA -foldMapping '\x104be' s = Yield '\x104e6' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER LA -foldMapping '\x104bf' s = Yield '\x104e7' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER MA -foldMapping '\x104c0' s = Yield '\x104e8' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER NA -foldMapping '\x104c1' s = Yield '\x104e9' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER O -foldMapping '\x104c2' s = Yield '\x104ea' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER OIN -foldMapping '\x104c3' s = Yield '\x104eb' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER PA -foldMapping '\x104c4' s = Yield '\x104ec' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER EHPA -foldMapping '\x104c5' s = Yield '\x104ed' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER SA -foldMapping '\x104c6' s = Yield '\x104ee' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER SHA -foldMapping '\x104c7' s = Yield '\x104ef' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER TA -foldMapping '\x104c8' s = Yield '\x104f0' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER EHTA -foldMapping '\x104c9' s = Yield '\x104f1' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER TSA -foldMapping '\x104ca' s = Yield '\x104f2' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER EHTSA -foldMapping '\x104cb' s = Yield '\x104f3' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER TSHA -foldMapping '\x104cc' s = Yield '\x104f4' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER DHA -foldMapping '\x104cd' s = Yield '\x104f5' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER U -foldMapping '\x104ce' s = Yield '\x104f6' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER WA -foldMapping '\x104cf' s = Yield '\x104f7' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER KHA -foldMapping '\x104d0' s = Yield '\x104f8' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER GHA -foldMapping '\x104d1' s = Yield '\x104f9' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER ZA -foldMapping '\x104d2' s = Yield '\x104fa' (CC s '\x0000' '\x0000') --- OSAGE CAPITAL LETTER ZHA -foldMapping '\x104d3' s = Yield '\x104fb' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER A -foldMapping '\x10c80' s = Yield '\x10cc0' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER AA -foldMapping '\x10c81' s = Yield '\x10cc1' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EB -foldMapping '\x10c82' s = Yield '\x10cc2' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER AMB -foldMapping '\x10c83' s = Yield '\x10cc3' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EC -foldMapping '\x10c84' s = Yield '\x10cc4' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ENC -foldMapping '\x10c85' s = Yield '\x10cc5' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ECS -foldMapping '\x10c86' s = Yield '\x10cc6' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ED -foldMapping '\x10c87' s = Yield '\x10cc7' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER AND -foldMapping '\x10c88' s = Yield '\x10cc8' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER E -foldMapping '\x10c89' s = Yield '\x10cc9' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER CLOSE E -foldMapping '\x10c8a' s = Yield '\x10cca' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EE -foldMapping '\x10c8b' s = Yield '\x10ccb' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EF -foldMapping '\x10c8c' s = Yield '\x10ccc' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EG -foldMapping '\x10c8d' s = Yield '\x10ccd' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EGY -foldMapping '\x10c8e' s = Yield '\x10cce' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EH -foldMapping '\x10c8f' s = Yield '\x10ccf' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER I -foldMapping '\x10c90' s = Yield '\x10cd0' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER II -foldMapping '\x10c91' s = Yield '\x10cd1' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EJ -foldMapping '\x10c92' s = Yield '\x10cd2' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EK -foldMapping '\x10c93' s = Yield '\x10cd3' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER AK -foldMapping '\x10c94' s = Yield '\x10cd4' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER UNK -foldMapping '\x10c95' s = Yield '\x10cd5' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EL -foldMapping '\x10c96' s = Yield '\x10cd6' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ELY -foldMapping '\x10c97' s = Yield '\x10cd7' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EM -foldMapping '\x10c98' s = Yield '\x10cd8' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EN -foldMapping '\x10c99' s = Yield '\x10cd9' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ENY -foldMapping '\x10c9a' s = Yield '\x10cda' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER O -foldMapping '\x10c9b' s = Yield '\x10cdb' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER OO -foldMapping '\x10c9c' s = Yield '\x10cdc' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG OE -foldMapping '\x10c9d' s = Yield '\x10cdd' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER RUDIMENTA OE -foldMapping '\x10c9e' s = Yield '\x10cde' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER OEE -foldMapping '\x10c9f' s = Yield '\x10cdf' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EP -foldMapping '\x10ca0' s = Yield '\x10ce0' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EMP -foldMapping '\x10ca1' s = Yield '\x10ce1' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ER -foldMapping '\x10ca2' s = Yield '\x10ce2' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER SHORT ER -foldMapping '\x10ca3' s = Yield '\x10ce3' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ES -foldMapping '\x10ca4' s = Yield '\x10ce4' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ESZ -foldMapping '\x10ca5' s = Yield '\x10ce5' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ET -foldMapping '\x10ca6' s = Yield '\x10ce6' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ENT -foldMapping '\x10ca7' s = Yield '\x10ce7' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ETY -foldMapping '\x10ca8' s = Yield '\x10ce8' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ECH -foldMapping '\x10ca9' s = Yield '\x10ce9' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER U -foldMapping '\x10caa' s = Yield '\x10cea' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER UU -foldMapping '\x10cab' s = Yield '\x10ceb' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG UE -foldMapping '\x10cac' s = Yield '\x10cec' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER RUDIMENTA UE -foldMapping '\x10cad' s = Yield '\x10ced' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EV -foldMapping '\x10cae' s = Yield '\x10cee' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EZ -foldMapping '\x10caf' s = Yield '\x10cef' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER EZS -foldMapping '\x10cb0' s = Yield '\x10cf0' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER ENT-SHAPED SIGN -foldMapping '\x10cb1' s = Yield '\x10cf1' (CC s '\x0000' '\x0000') --- OLD HUNGARIAN CAPITAL LETTER US -foldMapping '\x10cb2' s = Yield '\x10cf2' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER ALIF -foldMapping '\x1e900' s = Yield '\x1e922' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER DAALI -foldMapping '\x1e901' s = Yield '\x1e923' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER LAAM -foldMapping '\x1e902' s = Yield '\x1e924' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER MIIM -foldMapping '\x1e903' s = Yield '\x1e925' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER BA -foldMapping '\x1e904' s = Yield '\x1e926' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER SINNYIIYHE -foldMapping '\x1e905' s = Yield '\x1e927' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER PE -foldMapping '\x1e906' s = Yield '\x1e928' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER BHE -foldMapping '\x1e907' s = Yield '\x1e929' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER RA -foldMapping '\x1e908' s = Yield '\x1e92a' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER E -foldMapping '\x1e909' s = Yield '\x1e92b' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER FA -foldMapping '\x1e90a' s = Yield '\x1e92c' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER I -foldMapping '\x1e90b' s = Yield '\x1e92d' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER O -foldMapping '\x1e90c' s = Yield '\x1e92e' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER DHA -foldMapping '\x1e90d' s = Yield '\x1e92f' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER YHE -foldMapping '\x1e90e' s = Yield '\x1e930' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER WAW -foldMapping '\x1e90f' s = Yield '\x1e931' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER NUN -foldMapping '\x1e910' s = Yield '\x1e932' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER KAF -foldMapping '\x1e911' s = Yield '\x1e933' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER YA -foldMapping '\x1e912' s = Yield '\x1e934' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER U -foldMapping '\x1e913' s = Yield '\x1e935' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER JIIM -foldMapping '\x1e914' s = Yield '\x1e936' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER CHI -foldMapping '\x1e915' s = Yield '\x1e937' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER HA -foldMapping '\x1e916' s = Yield '\x1e938' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER QAAF -foldMapping '\x1e917' s = Yield '\x1e939' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER GA -foldMapping '\x1e918' s = Yield '\x1e93a' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER NYA -foldMapping '\x1e919' s = Yield '\x1e93b' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER TU -foldMapping '\x1e91a' s = Yield '\x1e93c' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER NHA -foldMapping '\x1e91b' s = Yield '\x1e93d' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER VA -foldMapping '\x1e91c' s = Yield '\x1e93e' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER KHA -foldMapping '\x1e91d' s = Yield '\x1e93f' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER GBE -foldMapping '\x1e91e' s = Yield '\x1e940' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER ZAL -foldMapping '\x1e91f' s = Yield '\x1e941' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER KPO -foldMapping '\x1e920' s = Yield '\x1e942' (CC s '\x0000' '\x0000') --- ADLAM CAPITAL LETTER SHA -foldMapping '\x1e921' s = Yield '\x1e943' (CC s '\x0000' '\x0000') foldMapping c s = Yield (toLower c) (CC s '\0' '\0') From 0170e9e673106a9a3d8dc86a88fc9d0cca2fff76 Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Thu, 6 May 2021 18:45:10 +0100 Subject: [PATCH 2/4] Regenerate CI config --- .github/workflows/haskell-ci.yml | 58 +++++++++++++++++--------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 81af29c0..bc53a95d 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -1,6 +1,6 @@ # This GitHub workflow config has been generated by a script via # -# haskell-ci 'github' '--config=cabal.haskell-ci' 'cabal.project' +# haskell-ci 'github' '--config=cabal.haskell-ci' 'cabal.project' '--doctest' # # To regenerate the script (for example after adjusting tested-with) run # @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.11.20210222 +# version: 0.13.20210525 # -# REGENDATA ("0.11.20210222",["github","--config=cabal.haskell-ci","cabal.project"]) +# REGENDATA ("0.13.20210525",["github","--config=cabal.haskell-ci","cabal.project","--doctest"]) # name: Haskell-CI on: @@ -22,39 +22,39 @@ on: - master jobs: linux: - name: Haskell-CI - Linux - GHC ${{ matrix.ghc }} + name: Haskell-CI - Linux - ${{ matrix.compiler }} runs-on: ubuntu-18.04 container: - image: buildpack-deps:bionic + image: buildpack-deps:xenial continue-on-error: ${{ matrix.allow-failure }} strategy: matrix: include: - - ghc: 9.0.1 + - compiler: ghc-9.0.1 allow-failure: false - - ghc: 8.10.4 + - compiler: ghc-8.10.4 allow-failure: false - - ghc: 8.8.4 + - compiler: ghc-8.8.4 allow-failure: false - - ghc: 8.6.5 + - compiler: ghc-8.6.5 allow-failure: false - - ghc: 8.4.4 + - compiler: ghc-8.4.4 allow-failure: false - - ghc: 8.2.2 + - compiler: ghc-8.2.2 allow-failure: false - - ghc: 8.0.2 + - compiler: ghc-8.0.2 allow-failure: false - - ghc: 7.10.3 + - compiler: ghc-7.10.3 allow-failure: false - - ghc: 7.8.4 + - compiler: ghc-7.8.4 allow-failure: false - - ghc: 7.6.3 + - compiler: ghc-7.6.3 allow-failure: false - - ghc: 7.4.2 + - compiler: ghc-7.4.2 allow-failure: false - - ghc: 7.2.2 + - compiler: ghc-7.2.2 allow-failure: false - - ghc: 7.0.4 + - compiler: ghc-7.0.4 allow-failure: false fail-fast: false steps: @@ -64,29 +64,31 @@ jobs: apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common apt-add-repository -y 'ppa:hvr/ghc' apt-get update - apt-get install -y ghc-$GHC_VERSION cabal-install-3.4 + apt-get install -y $CC cabal-install-3.4 env: - GHC_VERSION: ${{ matrix.ghc }} + CC: ${{ matrix.compiler }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH echo "LANG=C.UTF-8" >> $GITHUB_ENV echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV - HC=/opt/ghc/$GHC_VERSION/bin/ghc + HCDIR=$(echo "/opt/$CC" | sed 's/-/\//') + HCNAME=ghc + HC=$HCDIR/bin/$HCNAME echo "HC=$HC" >> $GITHUB_ENV - echo "HCPKG=/opt/ghc/$GHC_VERSION/bin/ghc-pkg" >> $GITHUB_ENV - echo "HADDOCK=/opt/ghc/$GHC_VERSION/bin/haddock" >> $GITHUB_ENV + echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV + echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV if [ $((HCNUMVER >= 70600)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV ; else echo "ARG_BENCH=--disable-benchmarks" >> $GITHUB_ENV ; fi echo "HEADHACKAGE=false" >> $GITHUB_ENV - echo "ARG_COMPILER=--ghc --with-compiler=$HC" >> $GITHUB_ENV + echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV echo "GHCJSARITH=0" >> $GITHUB_ENV env: - GHC_VERSION: ${{ matrix.ghc }} + CC: ${{ matrix.compiler }} - name: env run: | env @@ -121,7 +123,7 @@ jobs: - name: cache (tools) uses: actions/cache@v2.1.5 with: - key: ${{ runner.os }}-${{ matrix.ghc }}-tools-2f29a7e3 + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-8139d618 path: ~/.haskell-ci-tools - name: install cabal-plan run: | @@ -175,9 +177,9 @@ jobs: - name: cache uses: actions/cache@v2.1.5 with: - key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }} + key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store - restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- + restore-keys: ${{ runner.os }}-${{ matrix.compiler }}- - name: build w/o tests run: | $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all From d0368b650947ff9e76388c9093a1da39dbc5cb49 Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Thu, 6 May 2021 19:12:57 +0100 Subject: [PATCH 3/4] Fix build warnings --- benchmarks/haskell/Benchmarks/Builder.hs | 4 +++- benchmarks/haskell/Benchmarks/DecodeUtf8.hs | 1 + benchmarks/haskell/Benchmarks/FileRead.hs | 5 ++++ .../haskell/Benchmarks/Programs/BigTable.hs | 6 +++-- .../haskell/Benchmarks/Programs/Fold.hs | 4 +++- .../haskell/Benchmarks/Programs/Sort.hs | 4 +++- benchmarks/haskell/Benchmarks/Pure.hs | 2 ++ .../Text/Internal/Lazy/Encoding/Fusion.hs | 1 - tests/Tests/Properties/Builder.hs | 4 +++- tests/Tests/Properties/Instances.hs | 3 +++ tests/Tests/Properties/LowLevel.hs | 23 ++++++++----------- tests/Tests/Properties/Transcoding.hs | 2 +- tests/Tests/QuickCheckUtils.hs | 2 ++ 13 files changed, 40 insertions(+), 21 deletions(-) diff --git a/benchmarks/haskell/Benchmarks/Builder.hs b/benchmarks/haskell/Benchmarks/Builder.hs index 8373dab7..bcc9108b 100644 --- a/benchmarks/haskell/Benchmarks/Builder.hs +++ b/benchmarks/haskell/Benchmarks/Builder.hs @@ -4,7 +4,7 @@ -- -- * Concatenating many small strings using a builder -- -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE CPP, OverloadedStrings #-} module Benchmarks.Builder ( benchmark ) where @@ -12,7 +12,9 @@ module Benchmarks.Builder import Test.Tasty.Bench (Benchmark, bgroup, bench, nf) import Data.Binary.Builder as B import Data.ByteString.Char8 () +#if !MIN_VERSION_base(4,8,0) import Data.Monoid (mconcat, mempty) +#endif import qualified Data.ByteString.Builder as Blaze import qualified Data.ByteString as SB import qualified Data.ByteString.Lazy as LB diff --git a/benchmarks/haskell/Benchmarks/DecodeUtf8.hs b/benchmarks/haskell/Benchmarks/DecodeUtf8.hs index 22418c6c..0cf846de 100644 --- a/benchmarks/haskell/Benchmarks/DecodeUtf8.hs +++ b/benchmarks/haskell/Benchmarks/DecodeUtf8.hs @@ -1,4 +1,5 @@ {-# LANGUAGE ForeignFunctionInterface #-} +{-# OPTIONS_GHC -fno-warn-deprecations #-} -- | Test decoding of UTF-8 -- diff --git a/benchmarks/haskell/Benchmarks/FileRead.hs b/benchmarks/haskell/Benchmarks/FileRead.hs index 2b7bfcec..01b3709d 100644 --- a/benchmarks/haskell/Benchmarks/FileRead.hs +++ b/benchmarks/haskell/Benchmarks/FileRead.hs @@ -4,11 +4,16 @@ -- -- * Reading a file from the disk -- + +{-# LANGUAGE CPP #-} + module Benchmarks.FileRead ( benchmark ) where +#if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>)) +#endif import Test.Tasty.Bench (Benchmark, bgroup, bench, whnfIO) import qualified Data.ByteString as SB import qualified Data.ByteString.Lazy as LB diff --git a/benchmarks/haskell/Benchmarks/Programs/BigTable.hs b/benchmarks/haskell/Benchmarks/Programs/BigTable.hs index e5b69481..fa56e0f8 100644 --- a/benchmarks/haskell/Benchmarks/Programs/BigTable.hs +++ b/benchmarks/haskell/Benchmarks/Programs/BigTable.hs @@ -6,13 +6,15 @@ -- -- * Writing to a handle -- -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE CPP, OverloadedStrings #-} module Benchmarks.Programs.BigTable ( benchmark ) where import Test.Tasty.Bench (Benchmark, bench, whnfIO) -import Data.Monoid (mappend, mconcat) +#if !MIN_VERSION_base(4,8,0) +import Data.Monoid (mconcat, mempty) +#endif import Data.Text.Lazy.Builder (Builder, fromText, toLazyText) import Data.Text.Lazy.IO (hPutStr) import System.IO (Handle) diff --git a/benchmarks/haskell/Benchmarks/Programs/Fold.hs b/benchmarks/haskell/Benchmarks/Programs/Fold.hs index 8b0d2685..6be8e73b 100644 --- a/benchmarks/haskell/Benchmarks/Programs/Fold.hs +++ b/benchmarks/haskell/Benchmarks/Programs/Fold.hs @@ -12,14 +12,16 @@ -- -- * Writing back to a handle -- -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE CPP, OverloadedStrings #-} module Benchmarks.Programs.Fold ( benchmark ) where import Data.List (foldl') import Data.List (intersperse) +#if !MIN_VERSION_base(4,8,0) import Data.Monoid (mempty, mappend, mconcat) +#endif import System.IO (Handle) import Test.Tasty.Bench (Benchmark, bench, whnfIO) import qualified Data.Text as T diff --git a/benchmarks/haskell/Benchmarks/Programs/Sort.hs b/benchmarks/haskell/Benchmarks/Programs/Sort.hs index 7379212f..7361f8e0 100644 --- a/benchmarks/haskell/Benchmarks/Programs/Sort.hs +++ b/benchmarks/haskell/Benchmarks/Programs/Sort.hs @@ -12,13 +12,15 @@ -- -- * Writing back to a handle -- -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE CPP, OverloadedStrings #-} module Benchmarks.Programs.Sort ( benchmark ) where import Test.Tasty.Bench (Benchmark, bgroup, bench, whnfIO) +#if !MIN_VERSION_base(4,8,0) import Data.Monoid (mconcat) +#endif import System.IO (Handle) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL diff --git a/benchmarks/haskell/Benchmarks/Pure.hs b/benchmarks/haskell/Benchmarks/Pure.hs index ed5eac7b..65c28f43 100644 --- a/benchmarks/haskell/Benchmarks/Pure.hs +++ b/benchmarks/haskell/Benchmarks/Pure.hs @@ -15,7 +15,9 @@ module Benchmarks.Pure import Control.DeepSeq (NFData (..)) import Control.Exception (evaluate) import Test.Tasty.Bench (Benchmark, bgroup, bench, nf) +#if !MIN_VERSION_base(4,8,0) import Data.Monoid (mappend, mempty) +#endif import GHC.Base (Char (..), Int (..), chr#, ord#, (+#)) import GHC.Generics (Generic) import GHC.Int (Int64) diff --git a/src/Data/Text/Internal/Lazy/Encoding/Fusion.hs b/src/Data/Text/Internal/Lazy/Encoding/Fusion.hs index 43dabd9b..c60ad4e4 100644 --- a/src/Data/Text/Internal/Lazy/Encoding/Fusion.hs +++ b/src/Data/Text/Internal/Lazy/Encoding/Fusion.hs @@ -54,7 +54,6 @@ import Data.ByteString.Internal (mallocByteString, memcpy) #if defined(ASSERTS) import Control.Exception (assert) #endif -import Data.Text.Internal.ByteStringCompat data S = S0 | S1 {-# UNPACK #-} !Word8 diff --git a/tests/Tests/Properties/Builder.hs b/tests/Tests/Properties/Builder.hs index 352fcad6..0f672bff 100644 --- a/tests/Tests/Properties/Builder.hs +++ b/tests/Tests/Properties/Builder.hs @@ -7,9 +7,11 @@ module Tests.Properties.Builder ( testBuilder ) where +#if !MIN_VERSION_base(4,8,0) import Data.Monoid (Monoid(..)) +#endif import Data.Int (Int8, Int16, Int32, Int64) -import Data.Word (Word, Word8, Word16, Word32, Word64) +import Data.Word import Numeric (showEFloat, showFFloat, showGFloat, showHex) import Test.QuickCheck import Test.Tasty (TestTree, testGroup) diff --git a/tests/Tests/Properties/Instances.hs b/tests/Tests/Properties/Instances.hs index c916937d..fd96ca6a 100644 --- a/tests/Tests/Properties/Instances.hs +++ b/tests/Tests/Properties/Instances.hs @@ -1,11 +1,14 @@ -- | Test instances +{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-enable-rewrite-rules -fno-warn-missing-signatures #-} module Tests.Properties.Instances ( testInstances ) where +#if !MIN_VERSION_base(4,8,0) import Data.Monoid (Monoid(..)) +#endif import Data.String (IsString(fromString)) import Test.QuickCheck import Test.Tasty (TestTree, testGroup) diff --git a/tests/Tests/Properties/LowLevel.hs b/tests/Tests/Properties/LowLevel.hs index 6f52ea39..4030539d 100644 --- a/tests/Tests/Properties/LowLevel.hs +++ b/tests/Tests/Properties/LowLevel.hs @@ -74,12 +74,12 @@ t_copy t = T.copy t === t -- Input and output. -t_put_get = write_read T.unlines T.filter put get - where put h = withRedirect h IO.stdout . T.putStr - get h = withRedirect h IO.stdin T.getContents -tl_put_get = write_read TL.unlines TL.filter put get - where put h = withRedirect h IO.stdout . TL.putStr - get h = withRedirect h IO.stdin TL.getContents +-- t_put_get = write_read T.unlines T.filter put get +-- where put h = withRedirect h IO.stdout . T.putStr +-- get h = withRedirect h IO.stdin T.getContents +-- tl_put_get = write_read TL.unlines TL.filter put get +-- where put h = withRedirect h IO.stdout . TL.putStr +-- get h = withRedirect h IO.stdin TL.getContents t_write_read = write_read T.unlines T.filter T.hPutStr T.hGetContents tl_write_read = write_read TL.unlines TL.filter TL.hPutStr TL.hGetContents @@ -113,19 +113,16 @@ testLowLevel = testProperty "t_take_drop_16" t_take_drop_16, testProperty "t_use_from" t_use_from, testProperty "t_copy" t_copy - ] + ], - {- testGroup "input-output" [ testProperty "t_write_read" t_write_read, testProperty "tl_write_read" tl_write_read, testProperty "t_write_read_line" t_write_read_line, testProperty "tl_write_read_line" tl_write_read_line - -- These tests are subject to I/O race conditions when run under - -- test-framework-quickcheck2. - -- testProperty "t_put_get" t_put_get + -- These tests are subject to I/O race conditions + -- testProperty "t_put_get" t_put_get, -- testProperty "tl_put_get" tl_put_get - ], - -} + ] ] diff --git a/tests/Tests/Properties/Transcoding.hs b/tests/Tests/Properties/Transcoding.hs index 2b612c86..33af0b0e 100644 --- a/tests/Tests/Properties/Transcoding.hs +++ b/tests/Tests/Properties/Transcoding.hs @@ -1,7 +1,7 @@ -- | Tests for encoding and decoding {-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} -{-# OPTIONS_GHC -fno-enable-rewrite-rules -fno-warn-missing-signatures -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-enable-rewrite-rules -fno-warn-missing-signatures -fno-warn-unused-imports -fno-warn-deprecations #-} module Tests.Properties.Transcoding ( testTranscoding ) where diff --git a/tests/Tests/QuickCheckUtils.hs b/tests/Tests/QuickCheckUtils.hs index 72ab0806..efe43cd1 100644 --- a/tests/Tests/QuickCheckUtils.hs +++ b/tests/Tests/QuickCheckUtils.hs @@ -35,7 +35,9 @@ module Tests.QuickCheckUtils , write_read ) where +#if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>)) +#endif import Control.Arrow (first, (***)) import Control.DeepSeq (NFData (..), deepseq) import Control.Exception (bracket) From 698290c5754a59104b1a7088a09293d67003ac61 Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Thu, 6 May 2021 19:32:43 +0100 Subject: [PATCH 4/4] Fix test of title conversion for Georgian characters --- benchmarks/haskell/Benchmarks/Programs/BigTable.hs | 2 +- tests/Tests/Properties/Text.hs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/benchmarks/haskell/Benchmarks/Programs/BigTable.hs b/benchmarks/haskell/Benchmarks/Programs/BigTable.hs index fa56e0f8..040935b9 100644 --- a/benchmarks/haskell/Benchmarks/Programs/BigTable.hs +++ b/benchmarks/haskell/Benchmarks/Programs/BigTable.hs @@ -13,7 +13,7 @@ module Benchmarks.Programs.BigTable import Test.Tasty.Bench (Benchmark, bench, whnfIO) #if !MIN_VERSION_base(4,8,0) -import Data.Monoid (mconcat, mempty) +import Data.Monoid (mconcat, mempty, mappend) #endif import Data.Text.Lazy.Builder (Builder, fromText, toLazyText) import Data.Text.Lazy.IO (hPutStr) diff --git a/tests/Tests/Properties/Text.hs b/tests/Tests/Properties/Text.hs index d4a1804c..e43cfb36 100644 --- a/tests/Tests/Properties/Text.hs +++ b/tests/Tests/Properties/Text.hs @@ -110,7 +110,7 @@ t_toTitle_title t = all (<= 1) (caps w) where caps = fmap (T.length . T.filter isUpper) . T.words . T.toTitle -- TIL: there exist uppercase-only letters w = T.filter (\c -> if C.isUpper c then C.toLower c /= c else True) t -t_toTitle_1stNotLower = and . notLow . T.toTitle . T.filter stable +t_toTitle_1stNotLower = and . notLow . T.toTitle . T.filter stable . T.filter (not . isGeorgian) where notLow = mapMaybe (fmap (not . isLower) . (T.find isLetter)) . T.words -- Surprise! The Spanish/Portuguese ordinal indicators changed -- from category Ll (letter, lowercase) to Lo (letter, other) @@ -119,6 +119,9 @@ t_toTitle_1stNotLower = and . notLow . T.toTitle . T.filter stable stable c = if isLower c then C.toUpper c /= c else c /= '\170' && c /= '\186' + -- Georgian text does not have a concept of title case + -- https://en.wikipedia.org/wiki/Georgian_Extended + isGeorgian c = c >= '\4256' && c < '\4352' justifyLeft k c xs = xs ++ L.replicate (k - length xs) c justifyRight m n xs = L.replicate (m - length xs) n ++ xs