Skip to content

GHC 9.* integer primitive support #1098

@robdockins

Description

@robdockins

The GHC 9.* series has made some pretty significant internal changes regarding how integer values are represented. Cryptol currently uses some internal support for GMP operations that aren't part of the "stable" Integer API, and we may need to do some work to be able to support these going forward.

From memory, the operations we care about that aren't part of the public API are:

  1. probable prime tests
  2. finite field inverse (inverse mod p)

We also make use of the nonpublic BigNat type internal to the PrimeECC module. This is primarily done to avoid boxing, allocations and small integer code paths related the Integer datatype itself. It provides a modest, but nontrival, improvement to the affected operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtFor issues that require some internal refactoring.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions