#9818: Add `Natural` number type to `base` -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: feature | Status: new request | Milestone: 7.10.1 Priority: normal | Version: Component: Core | Keywords: base natural Libraries | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: #3650 Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: Phab:D473 | -------------------------------------+------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:"859680f6fe952ecbef3395fa4f299530d0f10c58/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="859680f6fe952ecbef3395fa4f299530d0f10c58" Implement `GHC.Natural.powModNatural` (#9818) This makes use of the `powMod*` primitives provided by `integer-gmp-1.0.0`. This is the `Natural`-version of the related `GHC.Integer.GMP.Internals.powModInteger` operation. The fallback implementation uses a square and multiply algorithm, compared to which the optimized GMP-based implementation needs much less allocations due to in-place mutation during the computation. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9818#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler