From 0e15c844a9c2c4a2b315b7a7aac40c093663938c Mon Sep 17 00:00:00 2001 From: Naïm Favier Date: Sat, 6 Jan 2024 15:00:33 +0100 Subject: agda: enable debug printing --- pkgs/development/haskell-modules/configuration-darwin.nix | 2 +- pkgs/development/haskell-modules/configuration-nix.nix | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'pkgs/development/haskell-modules') diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix index e306884cf4fd..e6400e2c46c8 100644 --- a/pkgs/development/haskell-modules/configuration-darwin.nix +++ b/pkgs/development/haskell-modules/configuration-darwin.nix @@ -345,7 +345,7 @@ self: super: ({ }) (disableCabalFlag "fixity-th" super.fourmolu); # https://github.com/NixOS/nixpkgs/issues/149692 - Agda = removeConfigureFlag "-foptimise-heavily" super.Agda; + Agda = disableCabalFlag "optimise-heavily" super.Agda; } // lib.optionalAttrs pkgs.stdenv.isx86_64 { # x86_64-darwin diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index cecd27e023da..309426c67a14 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1133,10 +1133,16 @@ self: super: builtins.intersectAttrs super { preCheck = "export CI=true"; }) super.aeson-typescript; - # Enable extra optimisations which increase build time, but also - # later compiler performance, so we should do this for user's benefit. - # Flag added in Agda 2.6.2 - Agda = appendConfigureFlag "-foptimise-heavily" super.Agda; + Agda = lib.pipe super.Agda [ + # Enable extra optimisations which increase build time, but also + # later compiler performance, so we should do this for user's benefit. + # Flag added in Agda 2.6.2 + (enableCabalFlag "optimise-heavily") + # Enable debug printing, which worsens performance slightly but is + # very useful. + # Flag added in Agda 2.6.4.1, was always enabled before + (enableCabalFlag "debug") + ]; # ats-format uses cli-setup in Setup.hs which is quite happy to write # to arbitrary files in $HOME. This doesn't either not achieve anything -- cgit 1.4.1