Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile with ghc 9.8 #48

Merged
merged 7 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
ghc: ['8.10.7']
cabal: ['3.6.2.0']
ghc: ['9.6']
cabal: ['3.10']
exclude:
# can't build zlib
- os: windows-latest
ghc: '8.10.7'
cabal: '3.6.2.0'
ghc: '9.6'
cabal: '3.10'

steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v1.2
- uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v1.2
- uses: haskell-actions/setup@v2
with:
enable-stack: true
stack-no-global: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:

- name: Install GHC and cabal
run: |
ghcup install ghc --force -i /usr/local 8.10.7
ghcup install cabal --force -i /usr/local/bin 3.6.2.0
ghcup install ghc --force -i /usr/local 9.6.4
ghcup install cabal --force -i /usr/local/bin 3.10.2.1
shell: bash

- name: Update cabal cache
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- uses: haskell/actions/setup@v1.2
- uses: haskell-actions/setup@v2
with:
ghc-version: 8.10.7
cabal-version: 3.6.2.0
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.12 as builder

ARG GHC=8.10.7
ARG GHC=9.6.4

# install ghc and stack
RUN \
Expand Down
196 changes: 0 additions & 196 deletions cabal.project.freeze

This file was deleted.

5 changes: 5 additions & 0 deletions lib/StackageToHackage/Hackage.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
Expand Down Expand Up @@ -39,7 +40,11 @@ import Data.List.Extra (nubOrd, nubOrdOn, lower, dropPrefix, dropSuffix)
import Data.List.NonEmpty (NonEmpty((:|)))
import Data.Maybe (fromMaybe, mapMaybe, catMaybes)
import Data.Text (Text)
#if MIN_VERSION_Cabal(3, 8, 0)
import Distribution.Simple.PackageDescription (readGenericPackageDescription)
#else
import Distribution.PackageDescription.Parsec (readGenericPackageDescription)
#endif
import Distribution.Pretty (prettyShow)
import Distribution.Types.GenericPackageDescription
(GenericPackageDescription(..))
Expand Down
4 changes: 2 additions & 2 deletions lib/StackageToHackage/Stackage.hs
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ mergeResolvers (Resolver r c p f) (Resolver r' c' p' f') =
mergeDeps :: [Dep] -> [Dep] -> [Dep]
mergeDeps lhs rhs =
let nonGits = filter (not . isGitDep) lhs <> filter (not . isGitDep) rhs
gitsLhs = (\(SourceDep dep) -> dep) <$> filter isGitDep lhs
gitsRhs = (\(SourceDep dep) -> dep) <$> filter isGitDep rhs
gitsLhs = [dep | SourceDep dep <- lhs]
gitsRhs = [dep | SourceDep dep <- rhs]
gitMerged = foldl' (\m key -> update key m) gitsRhs gitsLhs
in (SourceDep <$> gitMerged) <> nonGits

Expand Down
4 changes: 1 addition & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
resolver: lts-18.28
resolver: lts-22.13
packages:
- .
extra-deps:
- hpack-0.35.0@sha256:8cd6146fae269390f41dc7237ebd2c479074d4163806d349a41f5a7751d6cea5,4726
2 changes: 1 addition & 1 deletion stack2cabal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ common deps
build-depends:
, base >=4.13 && <5.0
, bytestring
, Cabal >=3.0 && <3.8
, Cabal >=3.0 && <3.12
, containers
, directory
, exceptions ^>=0.10.4
Expand Down
2 changes: 1 addition & 1 deletion tests/hpack/hpack.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.34.5.
-- This file has been generated from package.yaml by hpack version 0.36.0.
--
-- see: https://github.com/sol/hpack
--
Expand Down
Loading