summaryrefslogtreecommitdiff
path: root/libraries/ghc-bignum/src/GHC/Num/Natural.hs-boot
blob: 28cf5d17712b8320d7a98c36a41464042ed65331 (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
naturalToBigNat :: Natural -> BigNat
naturalFromBigNat :: BigNat -> Natural
naturalMul :: Natural -> Natural -> Natural
naturalRem :: Natural -> Natural -> Natural
naturalIsZero :: Natural -> Bool
naturalShiftR# :: Natural -> Word# -> Natural
naturalTestBit# :: Natural -> Word# -> Bool#