Skip to content

Commit 5e596d7

Browse files
committed
Updates GHC and flake lock.
1 parent cb0a423 commit 5e596d7

10 files changed

Lines changed: 41 additions & 49 deletions

flake.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 26 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,14 @@
22
description = "Single file Lambda Calculus implementations and presentation slides.";
33

44
inputs = {
5-
# Nix Inputs
6-
nixpkgs.url = github:nixos/nixpkgs/23.05;
5+
nixpkgs.url = github:nixos/nixpkgs/24.05;
76
flake-utils.url = github:numtide/flake-utils;
87
};
98

10-
outputs =
11-
{ self
12-
, nixpkgs
13-
, flake-utils
14-
,
15-
}:
9+
outputs = { self , nixpkgs , flake-utils }:
10+
flake-utils.lib.eachDefaultSystem (system:
1611
let
17-
utils = flake-utils.lib;
18-
in
19-
utils.eachDefaultSystem (system:
20-
let
21-
compilerVersion = "ghc927";
12+
compilerVersion = "ghc982";
2213
pkgs = nixpkgs.legacyPackages.${system};
2314
hsPkgs = pkgs.haskell.packages.${compilerVersion}.override {
2415
overrides = hfinal: hprev: {
@@ -28,30 +19,30 @@
2819
in
2920
rec {
3021
packages =
31-
utils.flattenTree
32-
{ lambda-calculus-hs = hsPkgs.lambda-calculus-hs; };
22+
flake-utils.lib.flattenTree
23+
{ lambda-calculus-hs = hsPkgs.lambda-calculus-hs;
24+
default = hsPkgs.lambda-calculus-hs;
25+
};
3326

34-
# nix develop
35-
devShell = hsPkgs.shellFor {
36-
withHoogle = true;
37-
packages = p: [
38-
p.lambda-calculus-hs
39-
];
40-
buildInputs = with pkgs;
41-
[
42-
hsPkgs.haskell-language-server
43-
haskellPackages.cabal-install
44-
cabal2nix
45-
haskellPackages.ghcid
46-
haskellPackages.fourmolu
47-
haskellPackages.cabal-fmt
48-
nodePackages.serve
49-
nixpkgs-fmt
50-
]
51-
++ (builtins.attrValues (import ./scripts.nix { s = pkgs.writeShellScriptBin; }));
27+
devShells = {
28+
default = hsPkgs.shellFor {
29+
withHoogle = true;
30+
packages = p: [
31+
p.lambda-calculus-hs
32+
];
33+
buildInputs = with pkgs;
34+
[
35+
cabal-install
36+
cabal2nix
37+
haskell-language-server
38+
haskellPackages.ghcid
39+
haskellPackages.fourmolu
40+
haskellPackages.cabal-fmt
41+
]
42+
++ (builtins.attrValues (import ./scripts.nix { s = pkgs.writeShellScriptBin; }));
43+
};
5244
};
5345

54-
# nix build
55-
defaultPackage = packages.lambda-calculus-hs;
46+
formatter = pkgs.nixfmt-rfc-style;
5647
});
5748
}

main/02-NormalizationByEvaluation.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module Main where
55

66
--------------------------------------------------------------------------------
77

8+
import Control.Monad ((>=>), foldM)
89
import Control.Monad.Except (MonadError (..))
910
import Control.Monad.Identity
1011
import Control.Monad.Reader (MonadReader (..))

main/03-Elaboration.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module Main where
55

66
--------------------------------------------------------------------------------
77

8+
import Control.Monad (foldM)
89
import Control.Monad.Except (MonadError (..))
910
import Control.Monad.Identity
1011
import Control.Monad.Reader (MonadReader (..))

main/04-TypedHoles.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{-# LANGUAGE DerivingVia #-}
2-
{-# LANGUAGE TupleSections #-}
32
{-# OPTIONS_GHC -Wno-name-shadowing #-}
43

54
module Main where
65

76
--------------------------------------------------------------------------------
87

8+
import Control.Monad (foldM)
99
import Control.Monad.Except (MonadError (..))
1010
import Control.Monad.Identity
1111
import Control.Monad.Reader (MonadReader (..))

main/05-SystemT.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{-# LANGUAGE DerivingVia #-}
2-
{-# LANGUAGE TupleSections #-}
32
{-# OPTIONS_GHC -Wno-name-shadowing #-}
43

54
module Main where
65

76
--------------------------------------------------------------------------------
87

9-
import Control.Applicative (liftA2)
8+
import Control.Monad (foldM)
109
import Control.Monad.Except (MonadError (..))
1110
import Control.Monad.Identity
1211
import Control.Monad.Reader (MonadReader (..))

main/06-Records.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Main where
55

66
--------------------------------------------------------------------------------
77

8-
import Control.Applicative (liftA2)
8+
import Control.Monad (foldM)
99
import Control.Arrow ((&&&))
1010
import Control.Monad.Except (MonadError (..))
1111
import Control.Monad.Identity

main/07-Subtyping.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Main where
66

77
--------------------------------------------------------------------------------
88

9-
import Control.Applicative (liftA2)
9+
import Control.Monad (foldM)
1010
import Control.Arrow ((&&&))
1111
import Control.Monad.Except (MonadError (..))
1212
import Control.Monad.Identity

main/08-NominalInductiveTypes.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Main where
99

1010
--------------------------------------------------------------------------------
1111

12-
import Control.Applicative (liftA2)
12+
import Control.Monad (foldM, when, zipWithM)
1313
import Control.Arrow ((&&&))
1414
import Control.Monad.Except (MonadError (..))
1515
import Control.Monad.Identity

main/old/MLTT.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Main where
44

55
--------------------------------------------------------------------------------
66

7-
import Control.Monad.State
7+
import Control.Monad (foldM)
88
import Data.Bool (bool)
99
import Data.Foldable (find, sequenceA_)
1010
import Data.Maybe (fromMaybe)

0 commit comments

Comments
 (0)