{-# LANGUAGE CPP #-}
{-# LANGUAGE MagicHash #-}

module Data.Text.Internal.PrimCompat
  ( word8ToWord#
  , wordToWord8#

  , word16ToWord#
  , wordToWord16#

  , wordToWord32#
  , word32ToWord#
  ) where

#if MIN_VERSION_base(4,16,0)

import GHC.Base

#else

import GHC.Prim (Word#)

wordToWord8#,  word8ToWord#  :: Word# -> Word#
wordToWord16#, word16ToWord# :: Word# -> Word#
wordToWord32#, word32ToWord# :: Word# -> Word#
word8ToWord# :: Word# -> Word#
word8ToWord#  Word#
w = Word#
w
word16ToWord# :: Word# -> Word#
word16ToWord# Word#
w = Word#
w
word32ToWord# :: Word# -> Word#
word32ToWord# Word#
w = Word#
w
wordToWord8# :: Word# -> Word#
wordToWord8#  Word#
w = Word#
w
wordToWord16# :: Word# -> Word#
wordToWord16# Word#
w = Word#
w
wordToWord32# :: Word# -> Word#
wordToWord32# Word#
w = Word#
w
{-# INLINE wordToWord16# #-}
{-# INLINE word16ToWord# #-}
{-# INLINE wordToWord32# #-}
{-# INLINE word32ToWord# #-}

#endif