    -- |
    -- Module:      Math.NumberTheory.Utils.FromIntegral
    -- Copyright:   (c) 2017 Andrew Lelechenko
    -- Licence:     MIT
    -- Maintainer:  Andrew Lelechenko <andrew.lelechenko@gmail.com>
    --
    -- Monomorphic `fromIntegral`.
    --

    module Math.NumberTheory.Utils.FromIntegral
      ( wordToInt
      , wordToInteger
      , intToWord
      , intToInteger
      , naturalToInteger
      , integerToNatural
      , integerToWord
      , integerToInt
      ) where

    import Numeric.Natural (Natural)

    wordToInt :: Word -> Int
    wordToInt :: Word -> Int
    wordToInt = Word -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral
    {-# INLINE wordToInt #-}

    wordToInteger :: Word -> Integer
    wordToInteger :: Word -> Integer
    wordToInteger = Word -> Integer
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral
    {-# INLINE wordToInteger #-}

    intToWord :: Int -> Word
    intToWord :: Int -> Word
    intToWord = Int -> Word
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral
    {-# INLINE intToWord #-}

    intToInteger :: Int -> Integer
    intToInteger :: Int -> Integer
    intToInteger = Int -> Integer
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral
    {-# INLINE intToInteger #-}

    naturalToInteger :: Natural -> Integer
    naturalToInteger :: Natural -> Integer
    naturalToInteger = Natural -> Integer
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral
    {-# INLINE naturalToInteger #-}

    integerToNatural :: Integer -> Natural
    integerToNatural :: Integer -> Natural
    integerToNatural = Integer -> Natural
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral
    {-# INLINE integerToNatural #-}

    integerToWord :: Integer -> Word
    integerToWord :: Integer -> Word
    integerToWord = Integer -> Word
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral
    {-# INLINE integerToWord #-}

    integerToInt :: Integer -> Int
    integerToInt :: Integer -> Int
    integerToInt = Integer -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral
    {-# INLINE integerToInt #-}