From fb43d133321fc57b6912c28610ee81f3367c58d7 Mon Sep 17 00:00:00 2001 From: kokobd Date: Mon, 12 Feb 2024 00:58:19 +0000 Subject: [PATCH] support ghc 9.4 and 9.6 --- .github/workflows/test.yml | 12 +++++------- cabal-hoogle.cabal | 4 ++-- cabal.project | 1 - flake.lock | 30 ++++++++++++++++++++++++------ flake.nix | 12 ++++++------ 5 files changed, 37 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe4607c..0d9cd09 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,13 +8,11 @@ jobs: - ubuntu-latest - macos-latest ghc: - - "8.10.7" - - "9.0.2" - - "9.2.4" + - "9.2.8" + - "9.4.8" + - "9.6.4" exclude: - # precompiled 9.0 and 9.2 don't have docs - - os: macos-latest - ghc: "9.0.2" + # precompiled 9.0 and 9.2 don't have docs on MacOS - os: macos-latest ghc: "9.2.4" runs-on: ${{ matrix.os }} @@ -31,7 +29,7 @@ jobs: ghcup list ghcup rm ghc ${{ matrix.ghc }} || true ghcup install ghc ${{ matrix.ghc }} --set - ghcup install cabal 3.6.2.0 --set + ghcup install cabal 3.10.2.1 --set cabal update - name: Build run: | diff --git a/cabal-hoogle.cabal b/cabal-hoogle.cabal index e5b61b1..6257434 100644 --- a/cabal-hoogle.cabal +++ b/cabal-hoogle.cabal @@ -37,9 +37,9 @@ library , optparse-applicative >=0.16 && <1 , regex-tdfa ^>=1.3.1 , string-interpolate ^>=0.3.1.2 - , text ^>=1.2.4 + , text ^>=1.2.4 || ^>=2.0 , time >=1.10 && <2 - , transformers ^>=0.5.6 + , transformers ^>=0.5.6 || ^>=0.6 , typed-process ^>=0.2.10 default-language: Haskell2010 diff --git a/cabal.project b/cabal.project index 770bc62..6f92079 100644 --- a/cabal.project +++ b/cabal.project @@ -1,2 +1 @@ packages: ./ -index-state: 2023-06-05T00:00:00Z diff --git a/flake.lock b/flake.lock index e87e2cf..f4de6ef 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,15 @@ { "nodes": { "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1676283394, - "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "owner": "numtide", "repo": "flake-utils", - "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { @@ -17,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1678594102, - "narHash": "sha256-OHAHYiMWJFPNxuW/PcOMlSD2tvXnEYC1jxREBADHwwQ=", + "lastModified": 1707619277, + "narHash": "sha256-vKnYD5GMQbNQyyQm4wRlqi+5n0/F1hnvqSQgaBy4BqY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "796b4a3c1d903c4b9270cd2548fe46f524eeb886", + "rev": "f3a93440fbfff8a74350f4791332a19282cc6dc8", "type": "github" }, "original": { @@ -36,6 +39,21 @@ "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 14f24b2..c411cbc 100644 --- a/flake.nix +++ b/flake.nix @@ -8,8 +8,8 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; - compilers = [ "ghc8107" "ghc926" "ghc944" ]; - defaultCompiler = "ghc8107"; + compilers = [ "ghc92" "ghc94" "ghc96" ]; + defaultCompiler = "ghc94"; mkShell = compiler: pkgs.mkShell { buildInputs = with pkgs; [ @@ -20,10 +20,10 @@ haskell.compiler.${compiler} ormolu miniserve - ] ++ (with haskell.packages.${compiler}; [ - haskell-language-server - cabal-fmt - ]); + ] ++ (with haskell.packages.${compiler}; + (lib.lists.optional (compiler != "ghc96") haskell-language-server) ++ + [ cabal-fmt ghcid ] + ); shellHook = '' export CABAL_DIR=$(pwd)/.cabal export CABAL_CONFIG=$(pwd)/.cabal/config