[GHC] #9818: Add `Natural` number type to `base`

GHC ghc-devs at haskell.org
Sat Nov 22 00:09:48 UTC 2014


#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:"8a8cdbbfd855015049526c7945cbe9ccbb152f1e/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="8a8cdbbfd855015049526c7945cbe9ccbb152f1e"
 Implement `Natural` number type (re #9818)

 This implements a `Natural` type for representing unsigned arbitrary
 precision integers.

 When available, `integer-gmp>=1.0.0`'s `BigNat` type is used as
 building-block to construct `Natural` as an algebraic data-type.
 Otherwise, `Natural` falls back being a `newtype`-wrapper around
 `Integer` (as is done in Edward Kmett's `nats` package).

 The `GHC.Natural` module exposes an internal GHC-specific API, while
 `Numeric.Natural` provides the official & portable API.

 Reviewed By: austin, ekmett

 Differential Revision: https://phabricator.haskell.org/D473
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9818#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list