Skip to content

Commit

Permalink
Build with all the supported ghc's
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez committed May 16, 2024
1 parent b126f2a commit d3eb465
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 57 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/cabal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -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
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
File renamed without changes.
9 changes: 1 addition & 8 deletions lh-plugin-demo.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 0 additions & 18 deletions stack/stack-9.0.2.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions stack/stack-9.2.5.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions stack/stack-9.2.8.yaml
Original file line number Diff line number Diff line change
@@ -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]
15 changes: 15 additions & 0 deletions stack/stack-9.4.7.yaml
Original file line number Diff line number Diff line change
@@ -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]
15 changes: 15 additions & 0 deletions stack/stack-9.6.3.yaml
Original file line number Diff line number Diff line change
@@ -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]
17 changes: 17 additions & 0 deletions stack/stack-9.8.1.yaml
Original file line number Diff line number Diff line change
@@ -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]

0 comments on commit d3eb465

Please sign in to comment.