Merge pull request #110501 from neosimsim/agda-ghc-ieee754

agda.withPackages: use GHC with ieee754 as default
This commit is contained in:
Anderson Torres 2021-02-03 15:55:37 -03:00 committed by GitHub
commit a27a2c4b15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -46,7 +46,7 @@ depend: standard-library
More information can be found in the [official Agda documentation on library management](https://agda.readthedocs.io/en/v2.6.1/tools/package-system.html). More information can be found in the [official Agda documentation on library management](https://agda.readthedocs.io/en/v2.6.1/tools/package-system.html).
## Compiling Agda ## Compiling Agda
Agda modules can be compiled with the `--compile` flag. A version of `ghc` with `ieee` is made available to the Agda program via the `--with-compiler` flag. Agda modules can be compiled with the `--compile` flag. A version of `ghc` with `ieee754` is made available to the Agda program via the `--with-compiler` flag.
This can be overridden by a different version of `ghc` as follows: This can be overridden by a different version of `ghc` as follows:
``` ```

View file

@ -36,6 +36,10 @@ in
"cp ${hello-world} HelloWorld.agda" "cp ${hello-world} HelloWorld.agda"
) )
machine.succeed("agda -l standard-library -i . -c HelloWorld.agda") machine.succeed("agda -l standard-library -i . -c HelloWorld.agda")
# Check execution
assert "Hello World!" in machine.succeed(
"./HelloWorld"
), "HelloWorld does not run properly"
''; '';
} }
) )

View file

@ -7,7 +7,7 @@ with lib.strings;
let let
withPackages' = { withPackages' = {
pkgs, pkgs,
ghc ? ghcWithPackages (p: with p; [ ieee ]) ghc ? ghcWithPackages (p: with p; [ ieee754 ])
}: let }: let
pkgs' = if builtins.isList pkgs then pkgs else pkgs self; pkgs' = if builtins.isList pkgs then pkgs else pkgs self;
library-file = writeText "libraries" '' library-file = writeText "libraries" ''