Skip to content

Fix `integer-simple` API and tests

Alec Theriault requested to merge harpocrates/ghc:integer-simple-cleanup into master

Fixes #16043.

  • Support GHCi :print-ing of Integer from integer-simple. This requires adding an integer-simple Cabal flag to ghc.

  • Fixes API discrepancies between integer-gmp and integer-simple

    • Added popCountInteger, bitInteger, gcdInteger, and lcmInteger
    • Made testBitInteger much more efficient
  • Remove some now unnecessary CPP in base (ex: GHC.Natural no longer needs CPP for its export list)

  • Fix GHCi printing tests that were now failing only due to integer-gmp having an extra CorePrep optimization (for turning small Integer's straight into applications of S#) by switching Integer to Int in a bunch of places

Edited by Alec Theriault

Merge request reports