{-# LANGUAGE DeriveDataTypeable, EmptyDataDecls #-}
module Data.Text.ICU.BiDi.Internal
(
BiDi(..)
, UBiDi
, withBiDi
) where
import Data.Typeable (Typeable)
import Foreign.ForeignPtr (ForeignPtr, withForeignPtr)
import Foreign.Ptr (Ptr)
data UBiDi
newtype BiDi = BiDi (ForeignPtr UBiDi)
deriving (BiDi -> BiDi -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BiDi -> BiDi -> Bool
$c/= :: BiDi -> BiDi -> Bool
== :: BiDi -> BiDi -> Bool
$c== :: BiDi -> BiDi -> Bool
Eq, Typeable)
instance Show BiDi where
show :: BiDi -> String
show BiDi
_ = String
"BiDi"
withBiDi :: BiDi -> (Ptr UBiDi -> IO a) -> IO a
{-# INLINE withBiDi #-}
withBiDi :: forall a. BiDi -> (Ptr UBiDi -> IO a) -> IO a
withBiDi (BiDi ForeignPtr UBiDi
cnv) = forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr UBiDi
cnv