Skip to content

Commit

Permalink
Merge pull request #340 from turion/dev_ghc_910
Browse files Browse the repository at this point in the history
Allow GHC 9.10
  • Loading branch information
turion authored Nov 12, 2024
2 parents fcaec15 + 84e930f commit f557cd0
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 31 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ jobs:
- name: Build all packages
run: nix build --accept-flake-config
- name: Run tests
run: nix develop --accept-flake-config -c cabal test all
run: |
nix develop --accept-flake-config -c cabal update
nix develop --accept-flake-config -c cabal test all
# nix flake check breaks on IFD in multi-platform flake https://github.com/NixOS/nix/issues/4265
# - run: nix flake check

Expand Down
2 changes: 1 addition & 1 deletion automaton/automaton.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ source-repository this
common opts
build-depends:
MonadRandom >=0.5,
base >=4.14 && <4.20,
base >=4.16 && <4.21,
mmorph ^>=1.2,
mtl >=2.2 && <2.4,
profunctors ^>=5.6,
Expand Down
43 changes: 39 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 25 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
monad-schedule.url = "github:turion/monad-schedule";
};

outputs = inputs:
Expand All @@ -28,7 +29,7 @@
# To be kept in sync with the `tested-with:` section in rhine.cabal.
# To do: Automated check whether this is the same as what get-tested returns.
# Currently blocked on https://github.com/Kleidukos/get-tested/issues/39
supportedGhcs = [ "ghc92" "ghc94" "ghc96" "ghc98" ];
supportedGhcs = [ "ghc92" "ghc94" "ghc96" "ghc98" "ghc910" ];

# All Haskell packages defined here that contain a library section
libPnames = filter (pname: pname != "rhine-examples") pnames;
Expand All @@ -43,7 +44,7 @@
lib.genAttrs pnames (pname: hfinal.callCabal2nix pname ./${pname} { });

# A nixpkgs overlay containing everything defined in this repo, for reuse in downstream projects
overlay = final: prev:
localOverlay = final: prev:
let
hps = hpsFor final;

Expand All @@ -52,13 +53,6 @@
temporaryHaskellOverrides = with prev.haskell.lib.compose; [
(hfinal: hprev: {
monad-bayes = markUnbroken hprev.monad-bayes;
monad-schedule = hprev.callHackageDirect
{
pkg = "monad-schedule";
ver = "0.2";
sha256 = "sha256-Z9lAxkvJDH9aQZd65bGOQI3EGH7oSAhK0nuBKULgiCE=";
}
{ };
time-domain = hprev.callHackageDirect
{
pkg = "time-domain";
Expand All @@ -73,6 +67,22 @@
(hfinal: hprev: lib.optionalAttrs (lib.versionOlder hprev.ghc.version "9.4") {
time-domain = doJailbreak hprev.time-domain;
})
(hfinal: hprev: lib.optionalAttrs (lib.versionAtLeast hprev.ghc.version "9.10") {
# Remove these as nixpkgs progresses!
finite-typelits = doJailbreak hprev.finite-typelits;

vector-sized = hprev.callHackageDirect
{
pkg = "vector-sized";
ver = "1.6.1";
sha256 = "sha256-//EOAwpEEQkdYF88U/bp0uybKleYHRmTWaKsxIZvCeQ=";
}
{ };

microstache = doJailbreak hprev.microstache;
gloss-rendering = doJailbreak hprev.gloss-rendering;
gloss = doJailbreak hprev.gloss;
})
];

in
Expand Down Expand Up @@ -131,6 +141,12 @@
};
};

overlay = lib.composeManyExtensions
[
inputs.monad-schedule.overlays.default
localOverlay
];

# Helper to build a flake output for all systems that are defined in nixpkgs
forAllPlatforms = f:
mapAttrs (system: pkgs: f system (pkgs.extend overlay)) inputs.nixpkgs.legacyPackages;
Expand Down
4 changes: 2 additions & 2 deletions rhine-bayes/rhine-bayes.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ library
other-modules: Data.Automaton.Bayes
build-depends:
automaton,
base >=4.14 && <4.20,
base >=4.16 && <4.21,
log-domain >=0.12,
mmorph ^>=1.2,
monad-bayes ^>=1.3,
Expand Down Expand Up @@ -66,7 +66,7 @@ executable rhine-bayes-gloss
hs-source-dirs: app
build-depends:
automaton,
base >=4.14 && <4.20,
base >=4.16 && <4.21,
log-domain,
mmorph,
monad-bayes,
Expand Down
16 changes: 8 additions & 8 deletions rhine-examples/rhine-examples.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ executable HelloWorld
-with-rtsopts=-N

build-depends:
base >=4.14 && <4.20,
base >=4.16 && <4.21,
rhine ^>=1.4

default-language: Haskell2010
Expand All @@ -44,7 +44,7 @@ executable Demonstration
-with-rtsopts=-N

build-depends:
base >=4.14 && <4.20,
base >=4.16 && <4.21,
rhine ^>=1.4

default-language: Haskell2010
Expand All @@ -63,7 +63,7 @@ executable ADSR
-with-rtsopts=-N

build-depends:
base >=4.14 && <4.20,
base >=4.16 && <4.21,
rhine ^>=1.4

default-language: Haskell2010
Expand All @@ -82,7 +82,7 @@ executable Ball
-with-rtsopts=-N

build-depends:
base >=4.14 && <4.20,
base >=4.16 && <4.21,
random >=1.1,
rhine ^>=1.4

Expand All @@ -107,7 +107,7 @@ executable Periodic
-with-rtsopts=-N

build-depends:
base >=4.14 && <4.20,
base >=4.16 && <4.21,
monad-schedule >=0.1,
rhine ^>=1.4,
transformers >=0.5
Expand All @@ -128,7 +128,7 @@ executable EventClock
-with-rtsopts=-N

build-depends:
base >=4.14 && <4.20,
base >=4.16 && <4.21,
random >=1.1,
rhine ^>=1.4

Expand All @@ -148,7 +148,7 @@ executable Sawtooth
-with-rtsopts=-N

build-depends:
base >=4.14 && <4.20,
base >=4.16 && <4.21,
rhine ^>=1.4

default-language: Haskell2010
Expand All @@ -167,7 +167,7 @@ executable RandomWalk
-with-rtsopts=-N

build-depends:
base >=4.14 && <4.20,
base >=4.16 && <4.21,
random >=1.1,
rhine ^>=1.4,
simple-affine-space
Expand Down
4 changes: 2 additions & 2 deletions rhine-gloss/rhine-gloss.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ library

build-depends:
automaton,
base >=4.14 && <4.20,
base >=4.16 && <4.21,
gloss >=1.12,
mmorph >=1.1,
monad-schedule >=0.1,
Expand All @@ -57,7 +57,7 @@ executable rhine-gloss-gears
main-is: Main.hs
ghc-options: -threaded
build-depends:
base >=4.14 && <4.20,
base >=4.16 && <4.21,
rhine-gloss

default-language: Haskell2010
Expand Down
6 changes: 3 additions & 3 deletions rhine-terminal/rhine-terminal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ source-repository this
library
exposed-modules: FRP.Rhine.Terminal
build-depends:
base >=4.11 && <4.20,
base >=4.16 && <4.21,
exceptions >=0.10.4,
monad-schedule >=0.1.2,
rhine ^>=1.4,
Expand All @@ -47,7 +47,7 @@ executable rhine-terminal-simple
main-is: TerminalSimple.hs
ghc-options: -threaded
build-depends:
base >=4.14 && <4.20,
base >=4.16 && <4.21,
rhine ^>=1.4,
rhine-terminal,
terminal >=0.2.0.0,
Expand All @@ -71,7 +71,7 @@ test-suite rhine-terminal-tests
main-is: tests/Main.hs
ghc-options: -threaded
build-depends:
base >=4.14 && <4.20,
base >=4.16 && <4.21,
exceptions >=0.10.4,
hspec,
rhine ^>=1.4,
Expand Down
3 changes: 2 additions & 1 deletion rhine/rhine.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ tested-with:
ghc ==9.4.7
ghc ==9.6.4
ghc ==9.8.2
ghc ==9.10.1

source-repository head
type: git
Expand All @@ -48,7 +49,7 @@ source-repository this
common opts
build-depends:
automaton ^>=1.4,
base >=4.14 && <4.20,
base >=4.16 && <4.21,
monad-schedule ^>=0.2,
mtl >=2.2 && <2.4,
selective ^>=0.7,
Expand Down

0 comments on commit f557cd0

Please sign in to comment.