From 390818c947ae60d1e34a92ca7a620ac0a45a90dc Mon Sep 17 00:00:00 2001 From: Martijn Bastiaan Date: Fri, 23 Aug 2024 10:10:17 +0200 Subject: [PATCH] Add GHC 9.6.6 to CI (#35) --- .github/docker/build-and-publish-docker-image.sh | 5 ++--- .github/workflows/ci.yml | 3 ++- clash-vexriscv/clash-vexriscv.cabal | 2 +- clash-vexriscv/src/VexRiscv/VecToTuple.hs | 10 ++++++++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/docker/build-and-publish-docker-image.sh b/.github/docker/build-and-publish-docker-image.sh index 8c47cb3..fda016c 100755 --- a/.github/docker/build-and-publish-docker-image.sh +++ b/.github/docker/build-and-publish-docker-image.sh @@ -17,13 +17,12 @@ elif [[ "$1" != "" ]]; then fi UBUNTU_VERSION=jammy-20240125 -GHC_VERSIONS=( "9.4.8" "9.2.8" "9.0.2") -CABAL_VERSIONS=("3.10.2.0" "3.10.2.0" "3.10.2.0") +GHC_VERSIONS=( "9.6.6" "9.4.8" "9.2.8" "9.0.2") +CABAL_VERSION="3.10.2.0" for i in "${!GHC_VERSIONS[@]}" do GHC_VERSION="${GHC_VERSIONS[i]}" - CABAL_VERSION="${CABAL_VERSIONS[i]}" docker buildx build \ --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} \ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cf4d0c..d94d4fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,9 +114,10 @@ jobs: - "9.0.2" - "9.2.8" - "9.4.8" + - "9.6.6" container: - image: ghcr.io/clash-lang/clash-vexriscv-ci:${{ matrix.ghc }}-20240329 + image: ghcr.io/clash-lang/clash-vexriscv-ci:${{ matrix.ghc }}-20240823 steps: - name: Checkout diff --git a/clash-vexriscv/clash-vexriscv.cabal b/clash-vexriscv/clash-vexriscv.cabal index 9a22c48..36c3707 100644 --- a/clash-vexriscv/clash-vexriscv.cabal +++ b/clash-vexriscv/clash-vexriscv.cabal @@ -94,7 +94,7 @@ common common-options -fno-worker-wrapper -- clash-prelude will set suitable version bounds for the plugins build-depends: - base >= 4.14 && < 4.18, + base >= 4.14 && < 4.19, clash-prelude >= 1.6 && < 1.10, containers >= 0.6 && < 0.8, ghc-typelits-natnormalise, diff --git a/clash-vexriscv/src/VexRiscv/VecToTuple.hs b/clash-vexriscv/src/VexRiscv/VecToTuple.hs index 647a8f7..673d91b 100644 --- a/clash-vexriscv/src/VexRiscv/VecToTuple.hs +++ b/clash-vexriscv/src/VexRiscv/VecToTuple.hs @@ -15,7 +15,9 @@ import Clash.Prelude import Data.Tagged (Tagged(..)) -#if MIN_VERSION_base(4,16,0) +#if MIN_VERSION_base(4,18,0) +import Data.Tuple (Solo(MkSolo)) +#elif MIN_VERSION_base(4,16,0) import Data.Tuple (Solo(Solo)) #endif @@ -28,7 +30,11 @@ instance VecToTuple (Vec 0 a) where type TupType (Vec 0 a) = Tagged a () vecToTuple Nil = Tagged () -#if MIN_VERSION_base(4,16,0) +#if MIN_VERSION_base(4,18,0) +instance VecToTuple (Vec 1 a) where + type TupType (Vec 1 a) = Solo a + vecToTuple (a0 :> Nil) = MkSolo a0 +#elif MIN_VERSION_base(4,16,0) instance VecToTuple (Vec 1 a) where type TupType (Vec 1 a) = Solo a vecToTuple (a0 :> Nil) = Solo a0