-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Macros and modules to facilitate writing library bindings.
--
-- This package contains hsc2hs macros and Haskell modules that
-- can be used to write C library bindings according to a well defined
-- standard. See Bindings module documentation for details.
@package bindings-common
@version 0.2.4
module Bindings.C
isalnum :: CInt -> IO CInt
isalpha :: CInt -> IO CInt
isblank :: CInt -> IO CInt
iscntrl :: CInt -> IO CInt
isdigit :: CInt -> IO CInt
isgraph :: CInt -> IO CInt
islower :: CInt -> IO CInt
isprint :: CInt -> IO CInt
ispunct :: CInt -> IO CInt
isspace :: CInt -> IO CInt
isupper :: CInt -> IO CInt
isxdigit :: CInt -> IO CInt
tolower :: CInt -> IO CInt
toupper :: CInt -> IO CInt
data Lconv
Lconv :: CString -> CString -> CChar -> CString -> CString -> CChar -> CString -> CString -> CString -> CString -> CChar -> CChar -> CChar -> CString -> CChar -> CChar -> CChar -> CString -> Lconv
lconv'currency_symbol :: Lconv -> CString
lconv'decimal_point :: Lconv -> CString
lconv'frac_digits :: Lconv -> CChar
lconv'grouping :: Lconv -> CString
lconv'int_curr_symbol :: Lconv -> CString
lconv'int_frac_digits :: Lconv -> CChar
lconv'mon_decimal_point :: Lconv -> CString
lconv'mon_grouping :: Lconv -> CString
lconv'mon_thousands_sep :: Lconv -> CString
lconv'negative_sign :: Lconv -> CString
lconv'n_cs_precedes :: Lconv -> CChar
lconv'n_sep_by_space :: Lconv -> CChar
lconv'n_sign_posn :: Lconv -> CChar
lconv'positive_sign :: Lconv -> CString
lconv'p_cs_precedes :: Lconv -> CChar
lconv'p_sep_by_space :: Lconv -> CChar
lconv'p_sign_posn :: Lconv -> CChar
lconv'thousands_sep :: Lconv -> CString
localeconv :: IO (Ptr Lconv)
setlocale :: CInt -> CString -> IO CString
acos :: CDouble -> IO CDouble
acosf :: CFloat -> IO CFloat
acosl :: CLDouble -> IO CLDouble
acosh :: CDouble -> IO CDouble
acoshf :: CFloat -> IO CFloat
acoshl :: CLDouble -> IO CLDouble
asin :: CDouble -> IO CDouble
asinf :: CFloat -> IO CFloat
asinl :: CLDouble -> IO CLDouble
asinh :: CDouble -> IO CDouble
asinhf :: CFloat -> IO CFloat
asinhl :: CLDouble -> IO CLDouble
atan :: CDouble -> IO CDouble
atanf :: CFloat -> IO CFloat
atanl :: CLDouble -> IO CLDouble
atan2 :: CDouble -> CDouble -> IO CDouble
atan2f :: CFloat -> CFloat -> IO CFloat
atan2l :: CLDouble -> CLDouble -> IO CLDouble
atanh :: CDouble -> IO CDouble
atanhf :: CFloat -> IO CFloat
atanhl :: CLDouble -> IO CLDouble
cbrt :: CDouble -> IO CDouble
cbrtf :: CFloat -> IO CFloat
cbrtl :: CLDouble -> IO CLDouble
ceil :: CDouble -> IO CDouble
ceilf :: CFloat -> IO CFloat
ceill :: CLDouble -> IO CLDouble
copysign :: CDouble -> CDouble -> IO CDouble
copysignf :: CFloat -> CFloat -> IO CFloat
copysignl :: CLDouble -> CLDouble -> IO CLDouble
cos :: CDouble -> IO CDouble
cosf :: CFloat -> IO CFloat
cosl :: CLDouble -> IO CLDouble
cosh :: CDouble -> IO CDouble
coshf :: CFloat -> IO CFloat
coshl :: CLDouble -> IO CLDouble
erf :: CDouble -> IO CDouble
erff :: CFloat -> IO CFloat
erfl :: CLDouble -> IO CLDouble
erfc :: CDouble -> IO CDouble
erfcf :: CFloat -> IO CFloat
erfcl :: CLDouble -> IO CLDouble
exp :: CDouble -> IO CDouble
expf :: CFloat -> IO CFloat
expl :: CLDouble -> IO CLDouble
exp2 :: CDouble -> IO CDouble
exp2f :: CFloat -> IO CFloat
exp2l :: CLDouble -> IO CLDouble
expm1 :: CDouble -> IO CDouble
expm1f :: CFloat -> IO CFloat
expm1l :: CLDouble -> IO CLDouble
fabs :: CDouble -> IO CDouble
fabsf :: CFloat -> IO CFloat
fabsl :: CLDouble -> IO CLDouble
fdim :: CDouble -> CDouble -> IO CDouble
fdimf :: CFloat -> CFloat -> IO CFloat
fdiml :: CLDouble -> CLDouble -> IO CLDouble
floor :: CDouble -> IO CDouble
floorf :: CFloat -> IO CFloat
floorl :: CLDouble -> IO CLDouble
fma :: CDouble -> CDouble -> CDouble -> IO CDouble
fmaf :: CFloat -> CFloat -> CFloat -> IO CFloat
fmal :: CLDouble -> CLDouble -> CLDouble -> IO CLDouble
fmax :: CDouble -> CDouble -> IO CDouble
fmaxf :: CFloat -> CFloat -> IO CFloat
fmaxl :: CLDouble -> CLDouble -> IO CLDouble
fmin :: CDouble -> CDouble -> IO CDouble
fminf :: CFloat -> CFloat -> IO CFloat
fminl :: CLDouble -> CLDouble -> IO CLDouble
fmod :: CDouble -> CDouble -> IO CDouble
fmodf :: CFloat -> CFloat -> IO CFloat
fmodl :: CLDouble -> CLDouble -> IO CLDouble
frexp :: CDouble -> Ptr CInt -> IO CDouble
frexpf :: CFloat -> Ptr CInt -> IO CFloat
frexpl :: CLDouble -> Ptr CInt -> IO CLDouble
hypot :: CDouble -> CDouble -> IO CDouble
hypotf :: CFloat -> CFloat -> IO CFloat
hypotl :: CLDouble -> CLDouble -> IO CLDouble
ilogb :: CDouble -> IO CDouble
ilogbf :: CFloat -> IO CFloat
ilogbl :: CLDouble -> IO CLDouble
ldexp :: CDouble -> CInt -> IO CDouble
ldexpf :: CFloat -> CInt -> IO CFloat
ldexpl :: CLDouble -> CInt -> IO CLDouble
lgamma :: CDouble -> IO CDouble
lgammaf :: CFloat -> IO CFloat
lgammal :: CLDouble -> IO CLDouble
llrint :: CDouble -> IO CLLong
llrintf :: CFloat -> IO CLLong
llrintl :: CLDouble -> IO CLLong
llround :: CDouble -> IO CLLong
llroundf :: CFloat -> IO CLLong
llroundl :: CLDouble -> IO CLLong
log :: CDouble -> IO CDouble
logf :: CFloat -> IO CFloat
logl :: CLDouble -> IO CLDouble
log10 :: CDouble -> IO CDouble
log10f :: CFloat -> IO CFloat
log10l :: CLDouble -> IO CLDouble
log1p :: CDouble -> IO CDouble
log1pf :: CFloat -> IO CFloat
log1pl :: CLDouble -> IO CLDouble
log2 :: CDouble -> IO CDouble
log2f :: CFloat -> IO CFloat
log2l :: CLDouble -> IO CLDouble
logb :: CDouble -> IO CDouble
logbf :: CFloat -> IO CFloat
logbl :: CLDouble -> IO CLDouble
lrint :: CDouble -> IO CLong
lrintf :: CFloat -> IO CLong
lrintl :: CLDouble -> IO CLong
lround :: CDouble -> IO CLong
lroundf :: CFloat -> IO CLong
lroundl :: CLDouble -> IO CLong
modf :: CDouble -> Ptr CDouble -> IO CDouble
modff :: CFloat -> Ptr CFloat -> IO CFloat
modfl :: CLDouble -> Ptr CLDouble -> IO CLDouble
nan :: CString -> IO CDouble
nanf :: CString -> IO CFloat
nanl :: CString -> IO CLDouble
nearbyint :: CDouble -> IO CDouble
nearbyintf :: CFloat -> IO CFloat
nearbyintl :: CLDouble -> IO CLDouble
nextafter :: CDouble -> CDouble -> IO CDouble
nextafterf :: CFloat -> CFloat -> IO CFloat
nextafterl :: CLDouble -> CLDouble -> IO CLDouble
nexttoward :: CDouble -> CLDouble -> IO CDouble
nexttowardf :: CFloat -> CLDouble -> IO CFloat
nexttowardl :: CLDouble -> CLDouble -> IO CLDouble
pow :: CDouble -> CDouble -> IO CDouble
powf :: CFloat -> CFloat -> IO CFloat
powl :: CLDouble -> CLDouble -> IO CLDouble
remainder :: CDouble -> CDouble -> IO CDouble
remainderf :: CFloat -> CFloat -> IO CFloat
remainderl :: CLDouble -> CLDouble -> IO CLDouble
remquo :: CDouble -> CDouble -> Ptr CInt -> CDouble
remquof :: CFloat -> CFloat -> Ptr CInt -> CFloat
remquol :: CLDouble -> CLDouble -> Ptr CInt -> CLDouble
rint :: CDouble -> IO CDouble
rintf :: CFloat -> IO CFloat
rintl :: CLDouble -> IO CLDouble
round :: CDouble -> IO CDouble
roundf :: CFloat -> IO CFloat
roundl :: CLDouble -> IO CLDouble
scalbln :: CDouble -> CLong -> IO CDouble
scalblnf :: CFloat -> CLong -> IO CFloat
scalblnl :: CLDouble -> CLong -> IO CLDouble
scalbn :: CDouble -> CInt -> IO CDouble
scalbnf :: CFloat -> CInt -> IO CFloat
scalbnl :: CLDouble -> CInt -> IO CLDouble
sin :: CDouble -> IO CDouble
sinf :: CFloat -> IO CFloat
sinl :: CLDouble -> IO CLDouble
sinh :: CDouble -> IO CDouble
sinhf :: CFloat -> IO CFloat
sinhl :: CLDouble -> IO CLDouble
sqrt :: CDouble -> IO CDouble
sqrtf :: CFloat -> IO CFloat
sqrtl :: CLDouble -> IO CLDouble
tan :: CDouble -> IO CDouble
tanf :: CFloat -> IO CFloat
tanl :: CLDouble -> IO CLDouble
tanh :: CDouble -> IO CDouble
tanhf :: CFloat -> IO CFloat
tanhl :: CLDouble -> IO CLDouble
tgamma :: CDouble -> IO CDouble
tgammaf :: CFloat -> IO CFloat
tgammal :: CLDouble -> IO CLDouble
trunc :: CDouble -> IO CDouble
truncf :: CFloat -> IO CFloat
truncl :: CLDouble -> IO CLDouble
raise :: CInt -> IO CInt
signal :: CInt -> IO (FunPtr (CInt -> (CInt -> IO ())))
clearerr :: Ptr CFile -> IO ()
fclose :: Ptr CFile -> IO CInt
feof :: Ptr CFile -> IO CInt
ferror :: Ptr CFile -> IO CInt
fflush :: Ptr CFile -> IO CInt
fgetc :: Ptr CFile -> IO CInt
fgetpos :: Ptr CFile -> Ptr CFpos -> IO CInt
fgets :: CString -> CInt -> Ptr CFile -> IO CString
fopen :: CString -> CString -> IO (Ptr CFile)
fputc :: CInt -> Ptr CFile -> IO CInt
fputs :: CString -> Ptr CFile -> IO CInt
fread :: Ptr () -> CSize -> CSize -> Ptr CFile -> IO CSize
freopen :: CString -> CString -> Ptr CFile -> IO (Ptr CFile)
fseek :: Ptr CFile -> CLong -> CInt -> IO CInt
fsetpos :: Ptr CFile -> Ptr CFpos -> IO CInt
ftell :: Ptr CFile -> IO CLong
fwrite :: Ptr () -> CSize -> CSize -> Ptr CFile -> IO CSize
getc :: Ptr CFile -> IO CInt
getchar :: IO CInt
perror :: CString -> IO ()
putc :: CInt -> Ptr CFile -> IO CInt
putchar :: CInt -> IO CInt
puts :: CString -> IO CInt
remove :: CString -> IO CInt
rename :: CString -> CString -> IO CInt
rewind :: Ptr CFile -> IO ()
setbuf :: Ptr CFile -> CString -> IO ()
setvbuf :: Ptr CFile -> CString -> CInt -> CSize -> IO CInt
tmpfile :: IO (Ptr CFile)
ungetc :: CInt -> Ptr CFile -> IO CInt
__Exit :: CInt -> IO ()
abort :: IO ()
abs :: CInt -> IO CInt
atexit :: FunPtr (IO ()) -> IO CInt
atof :: CString -> IO CDouble
atoi :: CString -> IO CInt
atol :: CString -> IO CLong
atoll :: CString -> IO CLLong
bsearch :: Ptr a -> Ptr a -> CSize -> CSize -> FunPtr (Ptr a -> Ptr a -> IO CInt) -> IO (Ptr a)
calloc :: CSize -> CSize -> IO (Ptr ())
exit :: CInt -> IO ()
free :: Ptr () -> IO ()
getenv :: CString -> IO CString
getsubopt :: Ptr CString -> Ptr CString -> Ptr CString -> IO CInt
labs :: CLong -> IO CLong
llabs :: CLLong -> IO CLLong
malloc :: CSize -> IO (Ptr ())
mblen :: CString -> CSize -> IO CInt
mbstowcs :: Ptr CWchar -> CString -> CSize -> IO CSize
mbtowc :: Ptr CWchar -> CString -> CSize -> IO CInt
qsort :: Ptr a -> CSize -> CSize -> FunPtr (Ptr a -> Ptr a -> IO CInt) -> IO ()
rand :: IO CInt
realloc :: Ptr () -> CSize -> IO (Ptr ())
srand :: CUInt -> IO ()
strtod :: CString -> Ptr CString -> IO CDouble
strtof :: CString -> Ptr CString -> IO CFloat
strtol :: CString -> Ptr CString -> CInt -> IO CLong
strtold :: CString -> Ptr CString -> IO CLDouble
strtoll :: CString -> Ptr CString -> CInt -> IO CLLong
strtoul :: CString -> Ptr CString -> CInt -> Ptr CULong
strtoull :: CString -> Ptr CString -> CInt -> IO CULLong
system :: CString -> IO CInt
wcstombs :: CString -> Ptr CWchar -> CSize -> IO CSize
wctomb :: CString -> CWchar -> IO CInt
data Tm
Tm :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Tm
tm'tm_sec :: Tm -> CInt
tm'tm_min :: Tm -> CInt
tm'tm_hour :: Tm -> CInt
tm'tm_mday :: Tm -> CInt
tm'tm_mon :: Tm -> CInt
tm'tm_year :: Tm -> CInt
tm'tm_wday :: Tm -> CInt
tm'tm_yday :: Tm -> CInt
tm'tm_isdst :: Tm -> CInt
clock :: IO CClock
difftime :: CTime -> CTime -> IO CDouble
gmtime :: Ptr CTime -> IO (Ptr Tm)
localtime :: Ptr CTime -> IO (Ptr Tm)
mktime :: Ptr Tm -> IO CTime
strftime :: CString -> CSize -> CString -> Ptr Tm -> IO CSize
time :: Ptr CTime -> IO CTime
data Mbstate_t
Mbstate_t :: Mbstate_t
type CWint = Word32
btowc :: CInt -> IO CWint
fgetwc :: Ptr CFile -> IO CWint
fgetws :: Ptr CWchar -> CInt -> Ptr CFile -> IO (Ptr CWchar)
fputwc :: CWchar -> Ptr CFile -> IO CWint
fputws :: Ptr CWchar -> Ptr CFile -> IO CInt
fwide :: Ptr CFile -> CInt -> IO CInt
getwc :: Ptr CFile -> IO CWint
getwchar :: IO CWint
mbrlen :: CString -> CSize -> Ptr Mbstate_t -> IO CSize
mbrtowc :: Ptr CWchar -> CString -> CSize -> Ptr Mbstate_t -> IO CSize
mbsinit :: Ptr Mbstate_t -> IO CInt
mbsrtowcs :: Ptr CWchar -> Ptr CString -> CSize -> Ptr Mbstate_t -> IO CSize
putwchar :: CWchar -> IO CWint
putwc :: CWchar -> Ptr CFile -> IO CWint
ungetwc :: CWint -> Ptr CFile -> IO CWint
wcrtomb :: CString -> CWchar -> Ptr Mbstate_t -> IO CSize
wcscat :: Ptr CWchar -> Ptr CWchar -> IO CWchar
wcschr :: Ptr CWchar -> CWchar -> IO CWchar
wcscmp :: Ptr CWchar -> Ptr CWchar -> IO CInt
wcscoll :: Ptr CWchar -> Ptr CWchar -> IO CInt
wcscpy :: Ptr CWchar -> Ptr CWchar -> IO (Ptr CWchar)
wcscspn :: Ptr CWchar -> Ptr CWchar -> IO CSize
wcsftime :: Ptr CWchar -> CSize -> Ptr CWchar -> Ptr Tm -> IO CSize
wcslen :: Ptr CWchar -> IO CSize
wcsncat :: Ptr CWchar -> Ptr CWchar -> CSize -> IO (Ptr CWchar)
wcsncmp :: Ptr CWchar -> Ptr CWchar -> CSize -> IO CInt
wcsncpy :: Ptr CWchar -> Ptr CWchar -> CSize -> IO (Ptr CWchar)
wcspbrk :: Ptr CWchar -> Ptr CWchar -> IO (Ptr CWchar)
wcsrchr :: Ptr CWchar -> CWchar -> IO (Ptr CWchar)
wcsrtombs :: CString -> Ptr (Ptr CWchar) -> CSize -> Ptr Mbstate_t -> IO CSize
wcsspn :: Ptr CWchar -> Ptr CWchar -> IO CSize
wcsstr :: Ptr CWchar -> Ptr CWchar -> IO (Ptr CWchar)
wcstod :: Ptr CWchar -> Ptr (Ptr CWchar) -> IO CDouble
wcstof :: Ptr CWchar -> Ptr (Ptr CWchar) -> IO CFloat
wcstok :: Ptr CWchar -> Ptr CWchar -> Ptr (Ptr CWchar) -> IO (Ptr CWchar)
wcstold :: Ptr CWchar -> Ptr (Ptr CWchar) -> IO CLDouble
wcstoll :: Ptr CWchar -> Ptr (Ptr CWchar) -> CInt -> IO CLLong
wcstol :: Ptr CWchar -> Ptr (Ptr CWchar) -> CInt -> CLong
wcstoull :: Ptr CWchar -> Ptr (Ptr CWchar) -> CInt -> IO CULLong
wcstoul :: Ptr CWchar -> Ptr (Ptr CWchar) -> CInt -> IO CULong
wcsxfrm :: Ptr CWchar -> Ptr CWchar -> CSize -> IO CSize
wctob :: CWint -> IO CInt
wmemchr :: Ptr CWchar -> CWchar -> CSize -> IO (Ptr CWchar)
wmemcmp :: Ptr CWchar -> Ptr CWchar -> CSize -> IO CInt
wmemcpy :: Ptr CWchar -> Ptr CWchar -> CSize -> IO (Ptr CWchar)
wmemmove :: Ptr CWchar -> Ptr CWchar -> CSize -> IO (Ptr CWchar)
wmemset :: Ptr CWchar -> CWchar -> CSize -> IO (Ptr CWchar)
type CWctrans = Word32
type CWctype = Word32
iswalnum :: CWint -> IO CInt
iswalpha :: CWint -> IO CInt
iswblank :: CWint -> IO CInt
iswcntrl :: CWint -> IO CInt
iswctype :: CWint -> CWctype -> IO CInt
iswdigit :: CWint -> IO CInt
iswgraph :: CWint -> IO CInt
iswlower :: CWint -> IO CInt
iswprint :: CWint -> IO CInt
iswpunct :: CWint -> IO CInt
iswspace :: CWint -> IO CInt
iswupper :: CWint -> IO CInt
iswxdigit :: CWint -> IO CInt
towctrans :: CWint -> CWctrans -> IO CWint
towlower :: CWint -> IO CWint
towupper :: CWint -> IO CWint
wctrans :: CString -> IO CWctrans
wctype :: CString -> IO CWctype
instance Storable Mbstate_t
instance Storable Tm
instance Storable Lconv
module Bindings.Utilities
-- | Haskell FFI imports global variables as pointers. To ease manipulation
-- of such pointers they are encapsulated by GlobalVariable so
-- that values can be reached directly, much like in an
-- Data.IORef.
data (Storable a) => GlobalVariable a
writeGlobalVariable :: (Storable a) => GlobalVariable a -> a -> IO ()
readGlobalVariable :: (Storable a) => GlobalVariable a -> IO a
-- | When libraries provide types for functions those types are made
-- instances of class Callback. That class is used to exchange
-- between Haskell functions and a representation (i.e., a hidden
-- pointer) that can be used or is provided by foreign code.
class (Storable cb) => Callback cb where { type family F cb :: *; { withCallback f c = do made <- makeCallback f result <- c made freeCallback made return result } }
nullCallback :: (Callback cb) => cb
makeCallback :: (Callback cb) => F cb -> IO cb
freeCallback :: (Callback cb) => cb -> IO ()
withCallback :: (Callback cb) => F cb -> (cb -> IO a) -> IO a
-- | Package bindings-common provides many facilities to do
-- low-level FFI to C libraris, in the form of macros and modules. It
-- also sets a base module under which low-level bindings to C libraries
-- can be inserted.
module Bindings