diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 007b257..a90b2ed 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' 'cobot-io.cabal' +# haskell-ci 'github' 'cabal.project' # # 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.16.6 +# version: 0.17.20231110 # -# REGENDATA ("0.16.6",["github","cobot-io.cabal"]) +# REGENDATA ("0.17.20231110",["github","cabal.project"]) # name: Haskell-CI on: @@ -32,6 +32,21 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.8.1 + compilerKind: ghc + compilerVersion: 9.8.1 + setup-method: ghcup + allow-failure: true + - compiler: ghc-9.6.3 + compilerKind: ghc + compilerVersion: 9.6.3 + setup-method: ghcup + allow-failure: true + - compiler: ghc-9.4.8 + compilerKind: ghc + compilerVersion: 9.4.8 + setup-method: ghcup + allow-failure: true - compiler: ghc-9.2.8 compilerKind: ghc compilerVersion: 9.2.8 @@ -54,10 +69,10 @@ jobs: apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -69,11 +84,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - HC=$HOME/.ghcup/bin/$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=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" - echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$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" @@ -168,6 +185,8 @@ jobs: echo "package cobot-io" >> cabal.project echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <= 1.3 yet -# || ==9.4.5 -# || ==9.6.2 + || ==9.4.8 + || ==9.6.3 + || ==9.8.1 # Metadata used when publishing your package @@ -44,7 +43,7 @@ dependencies: - cobot >= 0.1.1.7 - containers >= 0.5.7.1 && < 0.7 - data-msgpack >= 0.0.9 && < 0.1 -- deepseq >= 1.4 && < 1.5 +- deepseq >= 1.4 && < 1.6 - filepath - http-conduit >= 2.3 && < 2.4 - hyraxAbif >= 0.2.3.27 && < 0.2.5.0 @@ -54,7 +53,7 @@ dependencies: - mtl >= 2.2.1 && < 2.4 - parser-combinators >= 1.2.1 - split -- text >= 1.2.2.1 && < 2.1 +- text >= 1.2.2.1 && < 2.2 - vector library: diff --git a/src/Bio/Uniprot/Parser.hs b/src/Bio/Uniprot/Parser.hs index 51cbb12..aa1d1ad 100644 --- a/src/Bio/Uniprot/Parser.hs +++ b/src/Bio/Uniprot/Parser.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE TupleSections #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} @@ -9,8 +10,13 @@ module Bio.Uniprot.Parser where import Prelude hiding (null) import qualified Prelude as P (concat, init, last, null, tail) -import Bio.Uniprot.Type +#if MIN_VERSION_base(4, 18, 0) +import Control.Applicative ((<|>)) +#else import Control.Applicative (liftA2, (<|>)) +#endif + +import Bio.Uniprot.Type import Control.Monad (unless) import Data.Attoparsec.Text import Data.Bifunctor (second)