Cabal flag reference
When building Agda from source, the following flags can be used:
- debug
Enable debug printing. This makes Agda slightly slower, and building Agda slower as well. The
--verbose={N}option only has an effect when Agda was installed with this flag. Default: off.
- debug-serialisation
Enable debug mode in serialisation. This makes serialisation slower. Default: off.
- debug-parsing
Enable debug mode in the parser. This makes parsing slower. Default: off.
- dump-core
Save GHC Core output during compilation of Agda. Default: off.
- enable-cluster-counting
Enable cluster counting. This will require the text-icu Haskell library, which in turn requires that the ICU C library be installed. Note that if
enable-cluster-countingisFalse, then option--count-clusterstriggers an error message when given to Agda. Default: off, but on for development version.
- optimise-heavily
Optimise Agda heavily. If this flag is on, compiling Agda uses more memory but Agda runs faster. Default: on.
- use-xdg-data-home
Added in version 2.8.0.
Install data files under
$XDG_DATA_HOME/agda/$AGDA_VERSIONby default instead of the installation location defined by Cabal; see--print-agda-data-dir. This should not be enabled in declarative build environments like Nix or Guix. Default: off.
Hint
You can set these flags as follows:
With cabal-install, use the
-fargument:cabal install -fenable-cluster-counting
With stack, use
--flagand anAgda:prefix:stack install –flag Agda:enable-cluster-counting
With nix, code into your
.nixscripts usingenableCabalFlag:hlib.enableCabalFlag “debug” hpkgs.Agda-base