summaryrefslogtreecommitdiff
path: root/libraries/ghc-bignum/src/GHC/Num/Natural.hs-boot
blob: 964292fa5900f5707c005e955e01905d92d8cc81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE MagicHash #-}

module GHC.Num.Natural where

import {-# SOURCE #-} GHC.Num.BigNat
import GHC.Num.Primitives
import GHC.Prim
import GHC.Types

data Natural
   = NS !Word#
   | NB !BigNat

naturalToWord# :: Natural -> Word#
naturalFromWord# :: Word# -> Natural
naturalFromBigNat# :: BigNat# -> Natural
naturalToBigNat# :: Natural -> BigNat#
naturalMul :: Natural -> Natural -> Natural
naturalRem :: Natural -> Natural -> Natural
naturalIsZero :: Natural -> Bool
naturalShiftR# :: Natural -> Word# -> Natural
naturalTestBit# :: Natural -> Word# -> Bool#