diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index a4a78fa..5428623 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.19.20240512 +# version: 0.19.20250104 # -# REGENDATA ("0.19.20240512",["github","cabal.project"]) +# REGENDATA ("0.19.20250104",["github","cabal.project"]) # name: Haskell-CI on: @@ -79,15 +79,29 @@ jobs: allow-failure: false fail-fast: false steps: - - name: apt + - name: apt-get install run: | apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 + - name: Install GHCup + run: | mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" + - name: Install cabal-install + run: | + "$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1 -vnormal+nowrap" >> "$GITHUB_ENV" + - name: Install GHC (GHCup) + if: matrix.setup-method == 'ghcup' + run: | "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + echo "HC=$HC" >> "$GITHUB_ENV" + echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -98,21 +112,12 @@ jobs: echo "LANG=C.UTF-8" >> "$GITHUB_ENV" echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" - HCDIR=/opt/$HCKIND/$HCVER - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" - echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -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" echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" - if [ $((HCNUMVER >= 91000)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi + echo "HEADHACKAGE=false" >> "$GITHUB_ENV" echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" - echo "GHCJSARITH=0" >> "$GITHUB_ENV" env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -139,18 +144,6 @@ jobs: repository hackage.haskell.org url: http://hackage.haskell.org/ EOF - if $HEADHACKAGE; then - cat >> $CABAL_CONFIG <> $CABAL_CONFIG <> cabal.project cat >> cabal.project <> cabal.project - fi - $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(parsec)$/; }' >> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(parsec)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -260,8 +250,8 @@ jobs: $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='mtl ^>=2.3' all $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='mtl ^>=2.3' all - name: save cache - uses: actions/cache/save@v4 if: always() + uses: actions/cache/save@v4 with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store diff --git a/parsec.cabal b/parsec.cabal index b026453..1058564 100644 --- a/parsec.cabal +++ b/parsec.cabal @@ -1,157 +1,179 @@ -cabal-version: 1.12 -name: parsec -version: 3.1.18.0 - -synopsis: Monadic parser combinators -description: Parsec is designed from scratch as an industrial-strength parser - library. It is simple, safe, well documented (on the package - homepage), has extensive libraries, good error messages, - and is fast. It is defined as a monad transformer that can be - stacked on arbitrary monads, and it is also parametric in the - input stream type. - . - The main entry point is the "Text.Parsec" module which provides - defaults for parsing 'Char'acter data. - . - The "Text.ParserCombinators.Parsec" module hierarchy contains - the legacy @parsec-2@ API and may be removed at some point in - the future. - -license: BSD2 -license-file: LICENSE -author: Daan Leijen , Paolo Martini , Antoine Latter -maintainer: Oleg Grenrus , Herbert Valerio Riedel -homepage: https://github.com/haskell/parsec -bug-reports: https://github.com/haskell/parsec/issues -category: Parsing - -build-type: Simple -tested-with: GHC ==9.10.1 || ==9.8.2 || ==9.6.4 || ==9.4.8 || ==9.2.8 || ==9.0.2 || ==8.10.7 || ==8.8.4 || ==8.6.5 - -extra-source-files: ChangeLog.md, README.md +cabal-version: 1.12 +name: parsec +version: 3.1.18.1 +synopsis: Monadic parser combinators +description: + Parsec is designed from scratch as an industrial-strength parser + library. It is simple, safe, well documented (on the package + homepage), has extensive libraries, good error messages, + and is fast. It is defined as a monad transformer that can be + stacked on arbitrary monads, and it is also parametric in the + input stream type. + . + The main entry point is the "Text.Parsec" module which provides + defaults for parsing 'Char'acter data. + . + The "Text.ParserCombinators.Parsec" module hierarchy contains + the legacy @parsec-2@ API and may be removed at some point in + the future. + +license: BSD2 +license-file: LICENSE +author: + Daan Leijen , Paolo Martini , Antoine Latter + +maintainer: + Oleg Grenrus , Herbert Valerio Riedel + +homepage: https://github.com/haskell/parsec +bug-reports: https://github.com/haskell/parsec/issues +category: Parsing +build-type: Simple +tested-with: + GHC ==8.6.5 + || ==8.8.4 + || ==8.10.7 + || ==9.0.2 + || ==9.2.8 + || ==9.4.8 + || ==9.6.4 + || ==9.8.2 + || ==9.10.1 + || ==9.12.1 + +extra-source-files: + ChangeLog.md + README.md source-repository head - type: git - location: https://github.com/haskell/parsec + type: git + location: https://github.com/haskell/parsec library - hs-source-dirs: src - exposed-modules: - Text.Parsec - Text.Parsec.String - Text.Parsec.ByteString - Text.Parsec.ByteString.Lazy - Text.Parsec.Text - Text.Parsec.Text.Lazy - Text.Parsec.Pos - Text.Parsec.Error - Text.Parsec.Prim - Text.Parsec.Char - Text.Parsec.Combinator - Text.Parsec.Token - Text.Parsec.Expr - Text.Parsec.Language - Text.Parsec.Perm - Text.ParserCombinators.Parsec - Text.ParserCombinators.Parsec.Char - Text.ParserCombinators.Parsec.Combinator - Text.ParserCombinators.Parsec.Error - Text.ParserCombinators.Parsec.Expr - Text.ParserCombinators.Parsec.Language - Text.ParserCombinators.Parsec.Perm - Text.ParserCombinators.Parsec.Pos - Text.ParserCombinators.Parsec.Prim - Text.ParserCombinators.Parsec.Token - - build-depends: - base >= 4.12.0.0 && < 4.21, - mtl >= 2.2.2 && < 2.4, - bytestring >= 0.10.8.2 && < 0.13, - text (>= 1.2.3.0 && < 1.3) - || (>= 2.0 && < 2.2) - - default-language: Haskell2010 - other-extensions: - CPP - DeriveDataTypeable - ExistentialQuantification - FlexibleContexts - FlexibleInstances - FunctionalDependencies - MultiParamTypeClasses - PolymorphicComponents - StandaloneDeriving - Safe - Trustworthy - UndecidableInstances - - ghc-options: -Wall - if impl(ghc >= 8.0) - ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wno-trustworthy-safe - if impl(ghc < 8.8) - ghc-options: -Wnoncanonical-monadfail-instances - else - -- provide/emulate `Control.Monad.Fail` and `Semigroup` API for pre-GHC8 - build-depends: fail == 4.9.*, semigroups >= 0.18 && < 0.21 - - if impl(ghc >= 7.10) - ghc-options: -fno-warn-trustworthy-safe - - -- these flags may abort compilation with GHC-8.10 - -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295 - -- https://gitlab.haskell.org/ghc/ghc/-/issues/22728 - -- if impl(ghc >= 9.0) - -- -- ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode + hs-source-dirs: src + exposed-modules: + Text.Parsec + Text.Parsec.ByteString + Text.Parsec.ByteString.Lazy + Text.Parsec.Char + Text.Parsec.Combinator + Text.Parsec.Error + Text.Parsec.Expr + Text.Parsec.Language + Text.Parsec.Perm + Text.Parsec.Pos + Text.Parsec.Prim + Text.Parsec.String + Text.Parsec.Text + Text.Parsec.Text.Lazy + Text.Parsec.Token + Text.ParserCombinators.Parsec + Text.ParserCombinators.Parsec.Char + Text.ParserCombinators.Parsec.Combinator + Text.ParserCombinators.Parsec.Error + Text.ParserCombinators.Parsec.Expr + Text.ParserCombinators.Parsec.Language + Text.ParserCombinators.Parsec.Perm + Text.ParserCombinators.Parsec.Pos + Text.ParserCombinators.Parsec.Prim + Text.ParserCombinators.Parsec.Token + + build-depends: + base >=4.12.0.0 && <4.22 + , bytestring >=0.10.8.2 && <0.13 + , mtl >=2.2.2 && <2.4 + , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2 + + default-language: Haskell2010 + other-extensions: + CPP + DeriveDataTypeable + ExistentialQuantification + FlexibleContexts + FlexibleInstances + FunctionalDependencies + MultiParamTypeClasses + PolymorphicComponents + Safe + StandaloneDeriving + Trustworthy + UndecidableInstances + + ghc-options: -Wall + ghc-options: + -Wcompat -Wnoncanonical-monad-instances -Wno-trustworthy-safe + + if impl(ghc <8.8) + ghc-options: -Wnoncanonical-monadfail-instances + +-- these flags may abort compilation with GHC-8.10 +-- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295 +-- https://gitlab.haskell.org/ghc/ghc/-/issues/22728 +-- if impl(ghc >= 9.0) +-- -- ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode test-suite parsec-tests - type: exitcode-stdio-1.0 - - hs-source-dirs: test - main-is: Main.hs - other-modules: - Bugs - Bugs.Bug2 - Bugs.Bug6 - Bugs.Bug9 - Bugs.Bug35 - Features - Features.Feature80 - Features.Feature150 - Util - - build-depends: - base, - mtl, - parsec, - -- dependencies whose version bounds are not inherited via lib:parsec - tasty >= 1.4 && < 1.6, - tasty-hunit >= 0.10 && < 0.11 - - default-language: Haskell2010 - - ghc-options: -Wall - if impl(ghc >= 8.0) - ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances - else - build-depends: semigroups + type: exitcode-stdio-1.0 + hs-source-dirs: test + main-is: Main.hs + other-modules: + Bugs + Bugs.Bug2 + Bugs.Bug35 + Bugs.Bug6 + Bugs.Bug9 + Features + Features.Feature150 + Features.Feature80 + Util + + build-depends: + base + , mtl + , parsec + , tasty >=1.4 && <1.6 + , tasty-hunit >=0.10 && <0.11 + + -- dependencies whose version bounds are not inherited via lib:parsec + default-language: Haskell2010 + ghc-options: -Wall + + if impl(ghc >=8.0) + ghc-options: + -Wcompat -Wnoncanonical-monad-instances + -Wnoncanonical-monadfail-instances + + else + build-depends: semigroups test-suite parsec-issue127 - default-language: Haskell2010 - type: exitcode-stdio-1.0 - main-is: issue127.hs - hs-source-dirs: test - build-depends: base, parsec + default-language: Haskell2010 + type: exitcode-stdio-1.0 + main-is: issue127.hs + hs-source-dirs: test + build-depends: + base + , parsec test-suite parsec-issue171 - default-language: Haskell2010 - type: exitcode-stdio-1.0 - main-is: issue171.hs - hs-source-dirs: test - build-depends: base, tasty, tasty-hunit, deepseq, parsec + default-language: Haskell2010 + type: exitcode-stdio-1.0 + main-is: issue171.hs + hs-source-dirs: test + build-depends: + base + , deepseq + , parsec + , tasty + , tasty-hunit test-suite parsec-issue175 - default-language: Haskell2010 - type: exitcode-stdio-1.0 - main-is: issue175.hs - hs-source-dirs: test - build-depends: base, tasty, tasty-hunit, parsec + default-language: Haskell2010 + type: exitcode-stdio-1.0 + main-is: issue175.hs + hs-source-dirs: test + build-depends: + base + , parsec + , tasty + , tasty-hunit