Skip to content

Commit

Permalink
switch to new versions of agda2hs and scope to use expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
liesnikov committed Apr 15, 2024
1 parent 144197b commit 3c94ff4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
12 changes: 6 additions & 6 deletions flake.lock

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

21 changes: 11 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@
agda2hs-lib = agda2hs.packages.${system}.agda2hs-lib;
scope-lib = scope.packages.${system}.scope-lib;

compiler = "ghc96";
withCompiler = compiler:
let haskellPackages =
if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
agda2hs-custom = (agda2hs.lib.${system}.withCompiler compiler).withPackages [agda2hs-lib scope-lib];
in haskellPackages.callPackage ./nix/agda-core.nix {agda2hs = agda2hs-custom;};
agda-core = withCompiler compiler;
helper = agda2hs.lib.${system};
hpkgs = pkgs.haskell.packages.ghc96;
agda2hs-ghc96 = pkgs.callPackage (helper.agda2hs-expr) {
inherit self;
agda2hs = hpkgs.callPackage (helper.agda2hs-pkg "--jailbreak") {};
inherit (hpkgs) ghcWithPackages;
};
agda2hs-custom = agda2hs-ghc96.withPackages [agda2hs-lib scope-lib];
agda-core-pkg = import ./nix/agda-core.nix;
agda-core = pkgs.haskellPackages.callPackage ./nix/agda-core.nix {agda2hs = agda2hs-custom;};
in {
packages = {
agda-core-lib = agdaDerivation
Expand All @@ -49,7 +50,7 @@
default = agda-core;
};
lib = {
inherit withCompiler;
inherit agda-core-pkg;
};

devShells.default = pkgs.haskellPackages.shellFor {
Expand Down

0 comments on commit 3c94ff4

Please sign in to comment.