packages feed

ghc-bignum-1.4: ghc-bignum.cabal

cabal-version:       2.0
name:                ghc-bignum
version:             1.4
synopsis:            GHC BigNum library
license:             BSD3
license-file:        LICENSE
author:              Sylvain Henry
maintainer:          libraries@haskell.org
bug-reports:         https://gitlab.haskell.org/ghc/ghc/issues/new
category:            Numeric, Algebra, GHC
build-type:          Simple
description:
    This package used to provide the low-level implementation of the standard
    'BigNat', 'Natural' and 'Integer' types.
    Use `base:GHC.Num.{Integer,Natural,BigNat}` instead or other modules from
    `ghc-internal`.

extra-source-files:
    changelog.md

source-repository head
    type:     git
    location: https://gitlab.haskell.org/ghc/ghc.git
    subdir:   libraries/ghc-bignum


library
  default-language:    Haskell2010
  build-depends:
      base >= 4.22 && < 4.23
    , ghc-internal

  other-modules:
    -- dummy module to make Hadrian/GHC build a valid library...
    Dummy
  reexported-modules:
    -- reexport from ghc-internal
      GHC.Internal.Bignum.Primitives       as GHC.Num.Primitives
    , GHC.Internal.Bignum.WordArray        as GHC.Num.WordArray
    , GHC.Internal.Bignum.Backend          as GHC.Num.Backend
    , GHC.Internal.Bignum.Backend.Selected as GHC.Num.Backend.Selected
    , GHC.Internal.Bignum.Backend.Native   as GHC.Num.Backend.Native
    -- reexport from base
    -- We can't reexport these modules from ghc-internal otherwise we get
    -- ambiguity between:
    --   ghc-bignum:GHC.Num.X
    --   base:GHC.Num.X
    -- we should probably just deprecate ghc-bignum and encourage users to use
    -- exports from base instead.
    , GHC.Num.BigNat
    , GHC.Num.Natural
    , GHC.Num.Integer