{-# LANGUAGE CPP #-}
module Data.Bits.Pext
( Pext(..)
, fastPextEnabled
) where
import GHC.Word
import qualified Data.Bits.Pext.Prim as P
class Pext a where
pext
:: a
-> a
-> a
instance Pext Word where
pext :: Word -> Word -> Word
pext = Word -> Word -> Word
P.primPext
{-# INLINE pext #-}
instance Pext Word8 where
pext :: Word8 -> Word8 -> Word8
pext = Word8 -> Word8 -> Word8
P.primPext8
{-# INLINE pext #-}
instance Pext Word16 where
pext :: Word16 -> Word16 -> Word16
pext = Word16 -> Word16 -> Word16
P.primPext16
{-# INLINE pext #-}
instance Pext Word32 where
pext :: Word32 -> Word32 -> Word32
pext = Word32 -> Word32 -> Word32
P.primPext32
{-# INLINE pext #-}
instance Pext Word64 where
pext :: Word64 -> Word64 -> Word64
pext = Word64 -> Word64 -> Word64
P.primPext64
{-# INLINE pext #-}
fastPextEnabled :: Bool
fastPextEnabled :: Bool
fastPextEnabled = Bool
P.fastPextEnabled
{-# INLINE fastPextEnabled #-}