fficxx-runtime-0.7.0.1: Runtime for fficxx-generated library
Safe HaskellSafe-Inferred
LanguageHaskell2010

FFICXX.Runtime.Cast

Documentation

class Castable a b where Source #

Methods

cast :: a -> (b -> IO r) -> IO r Source #

uncast :: b -> (a -> IO r) -> IO r Source #

Instances

Instances details
Castable CBool CBool Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CBool -> (CBool -> IO r) -> IO r Source #

uncast :: CBool -> (CBool -> IO r) -> IO r Source #

Castable CChar CChar Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CChar -> (CChar -> IO r) -> IO r Source #

uncast :: CChar -> (CChar -> IO r) -> IO r Source #

Castable CClock CClock Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CClock -> (CClock -> IO r) -> IO r Source #

uncast :: CClock -> (CClock -> IO r) -> IO r Source #

Castable CDouble CDouble Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CDouble -> (CDouble -> IO r) -> IO r Source #

uncast :: CDouble -> (CDouble -> IO r) -> IO r Source #

Castable CFile CFile Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CFile -> (CFile -> IO r) -> IO r Source #

uncast :: CFile -> (CFile -> IO r) -> IO r Source #

Castable CFloat CFloat Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CFloat -> (CFloat -> IO r) -> IO r Source #

uncast :: CFloat -> (CFloat -> IO r) -> IO r Source #

Castable CFpos CFpos Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CFpos -> (CFpos -> IO r) -> IO r Source #

uncast :: CFpos -> (CFpos -> IO r) -> IO r Source #

Castable CInt CInt Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CInt -> (CInt -> IO r) -> IO r Source #

uncast :: CInt -> (CInt -> IO r) -> IO r Source #

Castable CIntMax CIntMax Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CIntMax -> (CIntMax -> IO r) -> IO r Source #

uncast :: CIntMax -> (CIntMax -> IO r) -> IO r Source #

Castable CIntPtr CIntPtr Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CIntPtr -> (CIntPtr -> IO r) -> IO r Source #

uncast :: CIntPtr -> (CIntPtr -> IO r) -> IO r Source #

Castable CJmpBuf CJmpBuf Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CJmpBuf -> (CJmpBuf -> IO r) -> IO r Source #

uncast :: CJmpBuf -> (CJmpBuf -> IO r) -> IO r Source #

Castable CLLong CLLong Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CLLong -> (CLLong -> IO r) -> IO r Source #

uncast :: CLLong -> (CLLong -> IO r) -> IO r Source #

Castable CLong CLong Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CLong -> (CLong -> IO r) -> IO r Source #

uncast :: CLong -> (CLong -> IO r) -> IO r Source #

Castable CPtrdiff CPtrdiff Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CPtrdiff -> (CPtrdiff -> IO r) -> IO r Source #

uncast :: CPtrdiff -> (CPtrdiff -> IO r) -> IO r Source #

Castable CSChar CSChar Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CSChar -> (CSChar -> IO r) -> IO r Source #

uncast :: CSChar -> (CSChar -> IO r) -> IO r Source #

Castable CSUSeconds CSUSeconds Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CSUSeconds -> (CSUSeconds -> IO r) -> IO r Source #

uncast :: CSUSeconds -> (CSUSeconds -> IO r) -> IO r Source #

Castable CShort CShort Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CShort -> (CShort -> IO r) -> IO r Source #

uncast :: CShort -> (CShort -> IO r) -> IO r Source #

Castable CSigAtomic CSigAtomic Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CSigAtomic -> (CSigAtomic -> IO r) -> IO r Source #

uncast :: CSigAtomic -> (CSigAtomic -> IO r) -> IO r Source #

Castable CSize CSize Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CSize -> (CSize -> IO r) -> IO r Source #

uncast :: CSize -> (CSize -> IO r) -> IO r Source #

Castable CTime CTime Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CTime -> (CTime -> IO r) -> IO r Source #

uncast :: CTime -> (CTime -> IO r) -> IO r Source #

Castable CUChar CUChar Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CUChar -> (CUChar -> IO r) -> IO r Source #

uncast :: CUChar -> (CUChar -> IO r) -> IO r Source #

Castable CUInt CUInt Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CUInt -> (CUInt -> IO r) -> IO r Source #

uncast :: CUInt -> (CUInt -> IO r) -> IO r Source #

Castable CUIntMax CUIntMax Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CUIntMax -> (CUIntMax -> IO r) -> IO r Source #

uncast :: CUIntMax -> (CUIntMax -> IO r) -> IO r Source #

Castable CUIntPtr CUIntPtr Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CUIntPtr -> (CUIntPtr -> IO r) -> IO r Source #

uncast :: CUIntPtr -> (CUIntPtr -> IO r) -> IO r Source #

Castable CULLong CULLong Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CULLong -> (CULLong -> IO r) -> IO r Source #

uncast :: CULLong -> (CULLong -> IO r) -> IO r Source #

Castable CULong CULong Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CULong -> (CULong -> IO r) -> IO r Source #

uncast :: CULong -> (CULong -> IO r) -> IO r Source #

Castable CUSeconds CUSeconds Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CUSeconds -> (CUSeconds -> IO r) -> IO r Source #

uncast :: CUSeconds -> (CUSeconds -> IO r) -> IO r Source #

Castable CUShort CUShort Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CUShort -> (CUShort -> IO r) -> IO r Source #

uncast :: CUShort -> (CUShort -> IO r) -> IO r Source #

Castable CWchar CWchar Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: CWchar -> (CWchar -> IO r) -> IO r Source #

uncast :: CWchar -> (CWchar -> IO r) -> IO r Source #

Castable Int16 CShort Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Int16 -> (CShort -> IO r) -> IO r Source #

uncast :: CShort -> (Int16 -> IO r) -> IO r Source #

Castable Int16 Int16 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Int16 -> (Int16 -> IO r) -> IO r Source #

uncast :: Int16 -> (Int16 -> IO r) -> IO r Source #

Castable Int32 Int32 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Int32 -> (Int32 -> IO r) -> IO r Source #

uncast :: Int32 -> (Int32 -> IO r) -> IO r Source #

Castable Int64 Int64 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Int64 -> (Int64 -> IO r) -> IO r Source #

uncast :: Int64 -> (Int64 -> IO r) -> IO r Source #

Castable Int8 CChar Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Int8 -> (CChar -> IO r) -> IO r Source #

uncast :: CChar -> (Int8 -> IO r) -> IO r Source #

Castable Int8 Int8 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Int8 -> (Int8 -> IO r) -> IO r Source #

uncast :: Int8 -> (Int8 -> IO r) -> IO r Source #

Castable Word16 Word16 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Word16 -> (Word16 -> IO r) -> IO r Source #

uncast :: Word16 -> (Word16 -> IO r) -> IO r Source #

Castable Word32 Word32 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Word32 -> (Word32 -> IO r) -> IO r Source #

uncast :: Word32 -> (Word32 -> IO r) -> IO r Source #

Castable Word64 Word64 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Word64 -> (Word64 -> IO r) -> IO r Source #

uncast :: Word64 -> (Word64 -> IO r) -> IO r Source #

Castable Word8 CChar Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Word8 -> (CChar -> IO r) -> IO r Source #

uncast :: CChar -> (Word8 -> IO r) -> IO r Source #

Castable Word8 Word8 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Word8 -> (Word8 -> IO r) -> IO r Source #

uncast :: Word8 -> (Word8 -> IO r) -> IO r Source #

Castable ByteString CString Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: ByteString -> (CString -> IO r) -> IO r Source #

uncast :: CString -> (ByteString -> IO r) -> IO r Source #

Castable () () Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: () -> (() -> IO r) -> IO r Source #

uncast :: () -> (() -> IO r) -> IO r Source #

Castable Double CDouble Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Double -> (CDouble -> IO r) -> IO r Source #

uncast :: CDouble -> (Double -> IO r) -> IO r Source #

Castable Int CInt Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Int -> (CInt -> IO r) -> IO r Source #

uncast :: CInt -> (Int -> IO r) -> IO r Source #

Castable Word CUInt Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Word -> (CUInt -> IO r) -> IO r Source #

uncast :: CUInt -> (Word -> IO r) -> IO r Source #

Castable (FunPtr t) (FunPtr t) Source # 
Instance details

Defined in FFICXX.Runtime.Function.Template

Methods

cast :: FunPtr t -> (FunPtr t -> IO r) -> IO r Source #

uncast :: FunPtr t -> (FunPtr t -> IO r) -> IO r Source #

Castable (Ptr CString) (Ptr CString) Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Ptr CString -> (Ptr CString -> IO r) -> IO r Source #

uncast :: Ptr CString -> (Ptr CString -> IO r) -> IO r Source #

Castable (Ptr CChar) (Ptr CChar) Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Ptr CChar -> (Ptr CChar -> IO r) -> IO r Source #

uncast :: Ptr CChar -> (Ptr CChar -> IO r) -> IO r Source #

Castable (Ptr CDouble) (Ptr CDouble) Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Ptr CDouble -> (Ptr CDouble -> IO r) -> IO r Source #

uncast :: Ptr CDouble -> (Ptr CDouble -> IO r) -> IO r Source #

Castable (Ptr CInt) (Ptr CInt) Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Ptr CInt -> (Ptr CInt -> IO r) -> IO r Source #

uncast :: Ptr CInt -> (Ptr CInt -> IO r) -> IO r Source #

Castable (Ptr CLong) (Ptr CLong) Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Ptr CLong -> (Ptr CLong -> IO r) -> IO r Source #

uncast :: Ptr CLong -> (Ptr CLong -> IO r) -> IO r Source #

Castable (Ptr CUInt) (Ptr CUInt) Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Ptr CUInt -> (Ptr CUInt -> IO r) -> IO r Source #

uncast :: Ptr CUInt -> (Ptr CUInt -> IO r) -> IO r Source #

Castable (Ptr CULong) (Ptr CULong) Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Ptr CULong -> (Ptr CULong -> IO r) -> IO r Source #

uncast :: Ptr CULong -> (Ptr CULong -> IO r) -> IO r Source #

Castable (Ptr ()) (Ptr ()) Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: Ptr () -> (Ptr () -> IO r) -> IO r Source #

uncast :: Ptr () -> (Ptr () -> IO r) -> IO r Source #

Castable (Function t) (Ptr (RawFunction t)) Source # 
Instance details

Defined in FFICXX.Runtime.Function.Template

Methods

cast :: Function t -> (Ptr (RawFunction t) -> IO r) -> IO r Source #

uncast :: Ptr (RawFunction t) -> (Function t -> IO r) -> IO r Source #

Castable [ByteString] (Ptr CString) Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: [ByteString] -> (Ptr CString -> IO r) -> IO r Source #

uncast :: Ptr CString -> ([ByteString] -> IO r) -> IO r Source #

Castable [Double] (Ptr CDouble) Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: [Double] -> (Ptr CDouble -> IO r) -> IO r Source #

uncast :: Ptr CDouble -> ([Double] -> IO r) -> IO r Source #

Castable [Int] (Ptr CInt) Source # 
Instance details

Defined in FFICXX.Runtime.Cast

Methods

cast :: [Int] -> (Ptr CInt -> IO r) -> IO r Source #

uncast :: Ptr CInt -> ([Int] -> IO r) -> IO r Source #

class FPtr a where Source #

Associated Types

type Raw a :: Type Source #

Methods

get_fptr :: a -> Ptr (Raw a) Source #

cast_fptr_to_obj :: Ptr (Raw a) -> a Source #

Instances

Instances details
FPtr (Function t) Source # 
Instance details

Defined in FFICXX.Runtime.Function.Template

Associated Types

type Raw (Function t) Source #

class IsCType a Source #

Instances

Instances details
IsCType CString Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CBool Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CChar Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CClock Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CDouble Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CFile Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CFloat Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CFpos Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CInt Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CIntMax Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CIntPtr Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CJmpBuf Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CLLong Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CLong Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CPtrdiff Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CSChar Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CSUSeconds Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CShort Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CSigAtomic Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CSize Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CTime Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CUChar Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CUInt Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CUIntMax Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CUIntPtr Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CULLong Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CULong Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CUSeconds Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CUShort Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType CWchar Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType Int16 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType Int32 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType Int64 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType Int8 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType Word16 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType Word32 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType Word64 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

IsCType Word8 Source # 
Instance details

Defined in FFICXX.Runtime.Cast

xformnull :: Castable a ca => IO ca -> IO a Source #

xform0 :: (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y Source #

xform1 :: (Castable a ca, Castable x1 cx1, Castable y cy) => (ca -> cx1 -> IO cy) -> a -> x1 -> IO y Source #

xform2 :: (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) => (ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y Source #

xform3 :: (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3, Castable y cy) => (ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y Source #

xform4 :: (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3, Castable x4 cx4, Castable y cy) => (ca -> cx1 -> cx2 -> cx3 -> cx4 -> IO cy) -> a -> x1 -> x2 -> x3 -> x4 -> IO y Source #

xform5 :: (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3, Castable x4 cx4, Castable x5 cx5, Castable y cy) => (ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> IO cy) -> a -> x1 -> x2 -> x3 -> x4 -> x5 -> IO y Source #

xform6 :: (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3, Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable y cy) => (ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> IO cy) -> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> IO y Source #

xform7 :: (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3, Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7, Castable y cy) => (ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> IO cy) -> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> IO y Source #

xform8 :: (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3, Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7, Castable x8 cx8, Castable y cy) => (ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> IO cy) -> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> IO y Source #

xform9 :: (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3, Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7, Castable x8 cx8, Castable x9 cx9, Castable y cy) => (ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> cx9 -> IO cy) -> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> x9 -> IO y Source #

xform10 :: (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3, Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7, Castable x8 cx8, Castable x9 cx9, Castable x10 cx10, Castable y cy) => (ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> cx9 -> cx10 -> IO cy) -> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> x9 -> x10 -> IO y Source #

xform11 :: (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3, Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7, Castable x8 cx8, Castable x9 cx9, Castable x10 cx10, Castable x11 cx11, Castable y cy) => (ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> cx9 -> cx10 -> cx11 -> IO cy) -> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> x9 -> x10 -> x11 -> IO y Source #