From e85c1d7d51194de24cd9f8f1e0ec770ec6c9a077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Facundo=20Dom=C3=ADnguez?= Date: Thu, 16 May 2024 02:00:46 +0000 Subject: [PATCH] Build with all the supported ghc's --- .github/workflows/cabal.yml | 11 +++++++---- .github/workflows/stack.yml | 12 +++++++----- README.md | 10 +++++++--- cabal.project => cabal.project.github | 0 lh-plugin-demo.cabal | 9 +-------- stack/stack-9.0.2.yaml | 18 ------------------ stack/stack-9.2.5.yaml | 20 -------------------- stack/stack-9.2.8.yaml | 15 +++++++++++++++ stack/stack-9.4.7.yaml | 15 +++++++++++++++ stack/stack-9.6.3.yaml | 15 +++++++++++++++ stack/stack-9.8.1.yaml | 17 +++++++++++++++++ 11 files changed, 84 insertions(+), 58 deletions(-) rename cabal.project => cabal.project.github (100%) delete mode 100644 stack/stack-9.0.2.yaml delete mode 100644 stack/stack-9.2.5.yaml create mode 100644 stack/stack-9.2.8.yaml create mode 100644 stack/stack-9.4.7.yaml create mode 100644 stack/stack-9.6.3.yaml create mode 100644 stack/stack-9.8.1.yaml diff --git a/.github/workflows/cabal.yml b/.github/workflows/cabal.yml index 03a619b..1eedef0 100644 --- a/.github/workflows/cabal.yml +++ b/.github/workflows/cabal.yml @@ -10,9 +10,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - cabal: ["3.6"] + cabal: ["3.10.3.0"] ghc: - - "9.2.5" + - "9.2.8" + - "9.4.7" + - "9.6.3" + - "9.8.1" steps: - uses: actions/checkout@v3 @@ -25,7 +28,7 @@ jobs: version: "4.8.7" - name: Setup GHC and cabal-install - uses: haskell/actions/setup@v2 + uses: haskell-actions/setup@v2 with: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} @@ -37,7 +40,7 @@ jobs: ~/.cabal/packages ~/.cabal/store dist-newstyle - key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }} + key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('**/*.cabal') }} - name: Update package list run: cabal update diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index 2d8fddc..6f5aeb8 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -10,10 +10,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - cabal: ["3.6"] + cabal: ["3.10.3.0"] ghc: - - "9.2.5" - - "9.0.2" + - "9.2.8" + - "9.4.7" + - "9.6.3" + - "9.8.1" steps: - uses: actions/checkout@v3 @@ -26,7 +28,7 @@ jobs: version: "4.8.7" - name: Setup Stack - uses: haskell/actions/setup@v2 + uses: haskell-actions/setup@v2 with: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} @@ -39,7 +41,7 @@ jobs: path: | ~/.stack .stack-work - key: ${{ runner.os }}-${{ matrix.ghc }}-stack-${{ hashFiles('**/*.cabal', './stack/stack-${{ matrix.ghc }}.yaml', './stack/stack-${{ matrix.ghc }}.yaml.lock') }} + key: ${{ runner.os }}-${{ matrix.ghc }}-stack-${{ hashFiles('**/*.cabal', './stack/stack-${{ matrix.ghc }}.yaml') }} - name: Build run: stack build --no-terminal --stack-yaml=./stack/stack-${{ matrix.ghc }}.yaml diff --git a/README.md b/README.md index 37d60d8..45a2b24 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,18 @@ This repo demonstrates how to use [LiquidHaskell](https://github.com/ucsd-progsy - how to point `stack` at the relevant LH repositories on **github** -[stack/stack-9.0.2.yaml](stack/stack-9.0.2.yaml) shows +[stack/stack-*.yaml](stack/) shows - how to point `stack` at the relevant LH packages on **hackage** -[cabal.project](cabal.project) shows +[cabal.project.github](cabal.project.github) shows - how to point `cabal` to the relevant LH repositories on **github** -- only works with ghc-9.2.5 +- only works with ghc-9.8.1 + +No `cabal.project` file is needed for the releases of `liquidhaskell` in hackage. +`cabal-install` should pick the appropriate version for each compiler (supported GHCs: +9.2.8, 9.4.7, 9.6.3, 9.8.1) ## GHCi Integration diff --git a/cabal.project b/cabal.project.github similarity index 100% rename from cabal.project rename to cabal.project.github diff --git a/lh-plugin-demo.cabal b/lh-plugin-demo.cabal index 681efe4..d49f5b2 100644 --- a/lh-plugin-demo.cabal +++ b/lh-plugin-demo.cabal @@ -22,15 +22,8 @@ library build-depends: liquid-prelude, liquid-vector, - liquidhaskell - if impl(ghc >= 9.2) - build-depends: + liquidhaskell, base, containers, vector - else - build-depends: - liquid-base, - liquid-containers default-language: Haskell2010 - -- ghc-options: -fplugin=LiquidHaskell diff --git a/stack/stack-9.0.2.yaml b/stack/stack-9.0.2.yaml deleted file mode 100644 index 094fc3e..0000000 --- a/stack/stack-9.0.2.yaml +++ /dev/null @@ -1,18 +0,0 @@ -resolver: lts-19.33 -packages: - - .. -extra-deps: - - hashable-1.3.5.0 - - rest-rewrite-0.4.1 - - smtlib-backends-0.3 - - smtlib-backends-process-0.3 - - liquidhaskell-0.9.0.2.1 - - liquid-base-4.15.1.0 - - liquid-containers-0.6.4.1 - - liquid-ghc-prim-0.7.0.1 - - liquid-prelude-0.9.0.2 - - liquid-vector-0.12.3.1 - - liquid-fixpoint-0.9.0.2.1 - -nix: - packages: [cacert, git, hostname, z3] diff --git a/stack/stack-9.2.5.yaml b/stack/stack-9.2.5.yaml deleted file mode 100644 index cd27d27..0000000 --- a/stack/stack-9.2.5.yaml +++ /dev/null @@ -1,20 +0,0 @@ -resolver: lts-20.1 -packages: - - .. -extra-deps: - - hashable-1.3.5.0 - - rest-rewrite-0.4.1 - - smtlib-backends-0.3 - - smtlib-backends-process-0.3 - - git: https://github.com/ucsd-progsys/liquidhaskell - commit: fc4a89b91fad8b7a02b72901381d4358a470e230 - subdirs: - - . - - liquidhaskell-boot - - liquid-prelude - - liquid-vector - - git: https://github.com/ucsd-progsys/liquid-fixpoint - commit: eb339f9abdf073f8d9f0c446c309006fdf49ed42 - -nix: - packages: [cacert, git, hostname, z3] diff --git a/stack/stack-9.2.8.yaml b/stack/stack-9.2.8.yaml new file mode 100644 index 0000000..1a39380 --- /dev/null +++ b/stack/stack-9.2.8.yaml @@ -0,0 +1,15 @@ +resolver: lts-20.26 +packages: + - .. +extra-deps: + - rest-rewrite-0.4.3 + - smtlib-backends-0.3 + - smtlib-backends-process-0.3 + - liquidhaskell-0.9.2.8.0 + - liquidhaskell-boot-0.9.2.8.0 + - liquid-fixpoint-0.9.2.5 + - liquid-prelude-0.9.2.8.1 + - liquid-vector-0.12.3.1.2 + +nix: + packages: [cacert, git, hostname, z3] diff --git a/stack/stack-9.4.7.yaml b/stack/stack-9.4.7.yaml new file mode 100644 index 0000000..33b5ea7 --- /dev/null +++ b/stack/stack-9.4.7.yaml @@ -0,0 +1,15 @@ +resolver: lts-21.21 +packages: + - .. +extra-deps: + - rest-rewrite-0.4.3 + - smtlib-backends-0.3 + - smtlib-backends-process-0.3 + - liquidhaskell-0.9.4.7.0 + - liquidhaskell-boot-0.9.4.7.0 + - liquid-fixpoint-0.9.4.7 + - liquid-prelude-0.9.2.8.1 + - liquid-vector-0.12.3.1.2 + +nix: + packages: [cacert, git, hostname, z3] diff --git a/stack/stack-9.6.3.yaml b/stack/stack-9.6.3.yaml new file mode 100644 index 0000000..13c8b47 --- /dev/null +++ b/stack/stack-9.6.3.yaml @@ -0,0 +1,15 @@ +resolver: lts-22.6 +packages: + - .. +extra-deps: + - rest-rewrite-0.4.3 + - smtlib-backends-0.3 + - smtlib-backends-process-0.3 + - liquidhaskell-0.9.6.3.1 + - liquidhaskell-boot-0.9.6.3 + - liquid-fixpoint-0.9.6.3 + - liquid-prelude-0.9.2.8.1 + - liquid-vector-0.13.1.0.1 + +nix: + packages: [cacert, git, hostname, z3] diff --git a/stack/stack-9.8.1.yaml b/stack/stack-9.8.1.yaml new file mode 100644 index 0000000..bf068ae --- /dev/null +++ b/stack/stack-9.8.1.yaml @@ -0,0 +1,17 @@ +resolver: nightly-2024-01-26 +packages: + - .. +extra-deps: + - rest-rewrite-0.4.3 + - smtlib-backends-0.3 + - smtlib-backends-process-0.3 + - store-0.7.18 + - store-core-0.4.4.7 + - liquidhaskell-0.9.8.1 + - liquidhaskell-boot-0.9.8.1 + - liquid-fixpoint-0.9.6.3 + - liquid-prelude-0.9.2.8.1 + - liquid-vector-0.13.1.0.1 + +nix: + packages: [cacert, git, hostname, z3]