Skip to content

integer-simple does not exist for >= GHC 9.0 #153742

@cocreature

Description

@cocreature

Describe the bug

Nix provides integer-simple distributions for all versions. However, for GHC 9.0 integer-simple does not exist anymore. Instead it is replaced by ghc-bignum.

Currently the integer-simple distributions for GHC 9.0 in nixpkgs build and run but they are actually gmp distributions.

A clear and concise description of what the bug is.

Steps To Reproduce

nix-shell -p "haskell.packages.integer-simple.ghc902.ghcWithPackages (pkgs: [])" --command "ghc-pkg list | grep gmp"
    integer-gmp-1.1

Expected behavior

integer-simple distributions for GHC 9.0 and newer are replaced by distributions using the native GHC bignum backend. Note that this is configured using a different flag. A crude but working attempt which still uses the integer-simple infrastructure but changes the flag is the following but I expect we probably want a different attribute and flag:

-    INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
+    BIGNUM_BACKEND = ${if enableIntegerSimple then "native" else "gmp"}

Notify maintainers

@guibou @cdepillabout @expipiplus1 @maralorn @sternenseemann

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.0-91-generic, Ubuntu, 20.04.3 LTS (Focal Fossa)`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.4`
 - channels(moritz): `"nixpkgs-22.05pre334669.f366af7a1b3, nixpkgs-unstable-22.05pre334669.f366af7a1b3"`
 - nixpkgs: `/home/moritz/.nix-defexpr/channels/nixpkgs`

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: haskellGeneral-purpose, statically typed, purely functional programming language

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions