{-# LANGUAGE CPP #-}
{-# LANGUAGE MagicHash #-}
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 = P.primPext
{-# INLINE pext #-}
instance Pext Word8 where
pext = P.primPext8
{-# INLINE pext #-}
instance Pext Word16 where
pext = P.primPext16
{-# INLINE pext #-}
instance Pext Word32 where
pext = P.primPext32
{-# INLINE pext #-}
instance Pext Word64 where
pext = P.primPext64
{-# INLINE pext #-}
fastPextEnabled :: Bool
fastPextEnabled = P.fastPextEnabled
{-# INLINE fastPextEnabled #-}