bindings-common 0.2.6 → 1.0
raw patch · 19 files changed
+529/−1417 lines, 19 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Bindings.C: Lconv :: CString -> CString -> CChar -> CString -> CString -> CChar -> CString -> CString -> CString -> CString -> CChar -> CChar -> CChar -> CString -> CChar -> CChar -> CChar -> CString -> Lconv
- Bindings.C: Mbstate_t :: Mbstate_t
- Bindings.C: Tm :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Tm
- Bindings.C: __Exit :: CInt -> IO ()
- Bindings.C: abort :: IO ()
- Bindings.C: abs :: CInt -> IO CInt
- Bindings.C: acos :: CDouble -> IO CDouble
- Bindings.C: acosf :: CFloat -> IO CFloat
- Bindings.C: acosh :: CDouble -> IO CDouble
- Bindings.C: acoshf :: CFloat -> IO CFloat
- Bindings.C: acoshl :: CLDouble -> IO CLDouble
- Bindings.C: acosl :: CLDouble -> IO CLDouble
- Bindings.C: asin :: CDouble -> IO CDouble
- Bindings.C: asinf :: CFloat -> IO CFloat
- Bindings.C: asinh :: CDouble -> IO CDouble
- Bindings.C: asinhf :: CFloat -> IO CFloat
- Bindings.C: asinhl :: CLDouble -> IO CLDouble
- Bindings.C: asinl :: CLDouble -> IO CLDouble
- Bindings.C: atan :: CDouble -> IO CDouble
- Bindings.C: atan2 :: CDouble -> CDouble -> IO CDouble
- Bindings.C: atan2f :: CFloat -> CFloat -> IO CFloat
- Bindings.C: atan2l :: CLDouble -> CLDouble -> IO CLDouble
- Bindings.C: atanf :: CFloat -> IO CFloat
- Bindings.C: atanh :: CDouble -> IO CDouble
- Bindings.C: atanhf :: CFloat -> IO CFloat
- Bindings.C: atanhl :: CLDouble -> IO CLDouble
- Bindings.C: atanl :: CLDouble -> IO CLDouble
- Bindings.C: atof :: CString -> IO CDouble
- Bindings.C: atoi :: CString -> IO CInt
- Bindings.C: atol :: CString -> IO CLong
- Bindings.C: atoll :: CString -> IO CLLong
- Bindings.C: bsearch :: Ptr a -> Ptr a -> CSize -> CSize -> FunPtr (Ptr a -> Ptr a -> IO CInt) -> IO (Ptr a)
- Bindings.C: btowc :: CInt -> IO CWint
- Bindings.C: calloc :: CSize -> CSize -> IO (Ptr ())
- Bindings.C: cbrt :: CDouble -> IO CDouble
- Bindings.C: cbrtf :: CFloat -> IO CFloat
- Bindings.C: cbrtl :: CLDouble -> IO CLDouble
- Bindings.C: ceil :: CDouble -> IO CDouble
- Bindings.C: ceilf :: CFloat -> IO CFloat
- Bindings.C: ceill :: CLDouble -> IO CLDouble
- Bindings.C: clearerr :: Ptr CFile -> IO ()
- Bindings.C: clock :: IO CClock
- Bindings.C: copysign :: CDouble -> CDouble -> IO CDouble
- Bindings.C: copysignf :: CFloat -> CFloat -> IO CFloat
- Bindings.C: copysignl :: CLDouble -> CLDouble -> IO CLDouble
- Bindings.C: cos :: CDouble -> IO CDouble
- Bindings.C: cosf :: CFloat -> IO CFloat
- Bindings.C: cosh :: CDouble -> IO CDouble
- Bindings.C: coshf :: CFloat -> IO CFloat
- Bindings.C: coshl :: CLDouble -> IO CLDouble
- Bindings.C: cosl :: CLDouble -> IO CLDouble
- Bindings.C: data Lconv
- Bindings.C: data Mbstate_t
- Bindings.C: data Tm
- Bindings.C: difftime :: CTime -> CTime -> IO CDouble
- Bindings.C: erf :: CDouble -> IO CDouble
- Bindings.C: erfc :: CDouble -> IO CDouble
- Bindings.C: erfcf :: CFloat -> IO CFloat
- Bindings.C: erfcl :: CLDouble -> IO CLDouble
- Bindings.C: erff :: CFloat -> IO CFloat
- Bindings.C: erfl :: CLDouble -> IO CLDouble
- Bindings.C: exit :: CInt -> IO ()
- Bindings.C: exp :: CDouble -> IO CDouble
- Bindings.C: exp2 :: CDouble -> IO CDouble
- Bindings.C: exp2f :: CFloat -> IO CFloat
- Bindings.C: exp2l :: CLDouble -> IO CLDouble
- Bindings.C: expf :: CFloat -> IO CFloat
- Bindings.C: expl :: CLDouble -> IO CLDouble
- Bindings.C: expm1 :: CDouble -> IO CDouble
- Bindings.C: expm1f :: CFloat -> IO CFloat
- Bindings.C: expm1l :: CLDouble -> IO CLDouble
- Bindings.C: fabs :: CDouble -> IO CDouble
- Bindings.C: fabsf :: CFloat -> IO CFloat
- Bindings.C: fabsl :: CLDouble -> IO CLDouble
- Bindings.C: fclose :: Ptr CFile -> IO CInt
- Bindings.C: fdim :: CDouble -> CDouble -> IO CDouble
- Bindings.C: fdimf :: CFloat -> CFloat -> IO CFloat
- Bindings.C: fdiml :: CLDouble -> CLDouble -> IO CLDouble
- Bindings.C: feof :: Ptr CFile -> IO CInt
- Bindings.C: ferror :: Ptr CFile -> IO CInt
- Bindings.C: fflush :: Ptr CFile -> IO CInt
- Bindings.C: fgetc :: Ptr CFile -> IO CInt
- Bindings.C: fgetpos :: Ptr CFile -> Ptr CFpos -> IO CInt
- Bindings.C: fgets :: CString -> CInt -> Ptr CFile -> IO CString
- Bindings.C: fgetwc :: Ptr CFile -> IO CWint
- Bindings.C: fgetws :: Ptr CWchar -> CInt -> Ptr CFile -> IO (Ptr CWchar)
- Bindings.C: floor :: CDouble -> IO CDouble
- Bindings.C: floorf :: CFloat -> IO CFloat
- Bindings.C: floorl :: CLDouble -> IO CLDouble
- Bindings.C: fma :: CDouble -> CDouble -> CDouble -> IO CDouble
- Bindings.C: fmaf :: CFloat -> CFloat -> CFloat -> IO CFloat
- Bindings.C: fmal :: CLDouble -> CLDouble -> CLDouble -> IO CLDouble
- Bindings.C: fmax :: CDouble -> CDouble -> IO CDouble
- Bindings.C: fmaxf :: CFloat -> CFloat -> IO CFloat
- Bindings.C: fmaxl :: CLDouble -> CLDouble -> IO CLDouble
- Bindings.C: fmin :: CDouble -> CDouble -> IO CDouble
- Bindings.C: fminf :: CFloat -> CFloat -> IO CFloat
- Bindings.C: fminl :: CLDouble -> CLDouble -> IO CLDouble
- Bindings.C: fmod :: CDouble -> CDouble -> IO CDouble
- Bindings.C: fmodf :: CFloat -> CFloat -> IO CFloat
- Bindings.C: fmodl :: CLDouble -> CLDouble -> IO CLDouble
- Bindings.C: fopen :: CString -> CString -> IO (Ptr CFile)
- Bindings.C: fputc :: CInt -> Ptr CFile -> IO CInt
- Bindings.C: fputs :: CString -> Ptr CFile -> IO CInt
- Bindings.C: fputwc :: CWchar -> Ptr CFile -> IO CWint
- Bindings.C: fputws :: Ptr CWchar -> Ptr CFile -> IO CInt
- Bindings.C: fread :: Ptr () -> CSize -> CSize -> Ptr CFile -> IO CSize
- Bindings.C: free :: Ptr () -> IO ()
- Bindings.C: freopen :: CString -> CString -> Ptr CFile -> IO (Ptr CFile)
- Bindings.C: frexp :: CDouble -> Ptr CInt -> IO CDouble
- Bindings.C: frexpf :: CFloat -> Ptr CInt -> IO CFloat
- Bindings.C: frexpl :: CLDouble -> Ptr CInt -> IO CLDouble
- Bindings.C: fseek :: Ptr CFile -> CLong -> CInt -> IO CInt
- Bindings.C: fsetpos :: Ptr CFile -> Ptr CFpos -> IO CInt
- Bindings.C: ftell :: Ptr CFile -> IO CLong
- Bindings.C: fwide :: Ptr CFile -> CInt -> IO CInt
- Bindings.C: fwrite :: Ptr () -> CSize -> CSize -> Ptr CFile -> IO CSize
- Bindings.C: getc :: Ptr CFile -> IO CInt
- Bindings.C: getchar :: IO CInt
- Bindings.C: getenv :: CString -> IO CString
- Bindings.C: getsubopt :: Ptr CString -> Ptr CString -> Ptr CString -> IO CInt
- Bindings.C: getwc :: Ptr CFile -> IO CWint
- Bindings.C: getwchar :: IO CWint
- Bindings.C: gmtime :: Ptr CTime -> IO (Ptr Tm)
- Bindings.C: hypot :: CDouble -> CDouble -> IO CDouble
- Bindings.C: hypotf :: CFloat -> CFloat -> IO CFloat
- Bindings.C: hypotl :: CLDouble -> CLDouble -> IO CLDouble
- Bindings.C: ilogb :: CDouble -> IO CDouble
- Bindings.C: ilogbf :: CFloat -> IO CFloat
- Bindings.C: ilogbl :: CLDouble -> IO CLDouble
- Bindings.C: instance Storable Lconv
- Bindings.C: instance Storable Mbstate_t
- Bindings.C: instance Storable Tm
- Bindings.C: isalnum :: CInt -> IO CInt
- Bindings.C: isalpha :: CInt -> IO CInt
- Bindings.C: isblank :: CInt -> IO CInt
- Bindings.C: iscntrl :: CInt -> IO CInt
- Bindings.C: isdigit :: CInt -> IO CInt
- Bindings.C: isgraph :: CInt -> IO CInt
- Bindings.C: islower :: CInt -> IO CInt
- Bindings.C: isprint :: CInt -> IO CInt
- Bindings.C: ispunct :: CInt -> IO CInt
- Bindings.C: isspace :: CInt -> IO CInt
- Bindings.C: isupper :: CInt -> IO CInt
- Bindings.C: iswalnum :: CWint -> IO CInt
- Bindings.C: iswalpha :: CWint -> IO CInt
- Bindings.C: iswblank :: CWint -> IO CInt
- Bindings.C: iswcntrl :: CWint -> IO CInt
- Bindings.C: iswctype :: CWint -> CWctype -> IO CInt
- Bindings.C: iswdigit :: CWint -> IO CInt
- Bindings.C: iswgraph :: CWint -> IO CInt
- Bindings.C: iswlower :: CWint -> IO CInt
- Bindings.C: iswprint :: CWint -> IO CInt
- Bindings.C: iswpunct :: CWint -> IO CInt
- Bindings.C: iswspace :: CWint -> IO CInt
- Bindings.C: iswupper :: CWint -> IO CInt
- Bindings.C: iswxdigit :: CWint -> IO CInt
- Bindings.C: isxdigit :: CInt -> IO CInt
- Bindings.C: labs :: CLong -> IO CLong
- Bindings.C: lconv'currency_symbol :: Lconv -> CString
- Bindings.C: lconv'decimal_point :: Lconv -> CString
- Bindings.C: lconv'frac_digits :: Lconv -> CChar
- Bindings.C: lconv'grouping :: Lconv -> CString
- Bindings.C: lconv'int_curr_symbol :: Lconv -> CString
- Bindings.C: lconv'int_frac_digits :: Lconv -> CChar
- Bindings.C: lconv'mon_decimal_point :: Lconv -> CString
- Bindings.C: lconv'mon_grouping :: Lconv -> CString
- Bindings.C: lconv'mon_thousands_sep :: Lconv -> CString
- Bindings.C: lconv'n_cs_precedes :: Lconv -> CChar
- Bindings.C: lconv'n_sep_by_space :: Lconv -> CChar
- Bindings.C: lconv'n_sign_posn :: Lconv -> CChar
- Bindings.C: lconv'negative_sign :: Lconv -> CString
- Bindings.C: lconv'p_cs_precedes :: Lconv -> CChar
- Bindings.C: lconv'p_sep_by_space :: Lconv -> CChar
- Bindings.C: lconv'p_sign_posn :: Lconv -> CChar
- Bindings.C: lconv'positive_sign :: Lconv -> CString
- Bindings.C: lconv'thousands_sep :: Lconv -> CString
- Bindings.C: ldexp :: CDouble -> CInt -> IO CDouble
- Bindings.C: ldexpf :: CFloat -> CInt -> IO CFloat
- Bindings.C: ldexpl :: CLDouble -> CInt -> IO CLDouble
- Bindings.C: lgamma :: CDouble -> IO CDouble
- Bindings.C: lgammaf :: CFloat -> IO CFloat
- Bindings.C: lgammal :: CLDouble -> IO CLDouble
- Bindings.C: llabs :: CLLong -> IO CLLong
- Bindings.C: llrint :: CDouble -> IO CLLong
- Bindings.C: llrintf :: CFloat -> IO CLLong
- Bindings.C: llrintl :: CLDouble -> IO CLLong
- Bindings.C: llround :: CDouble -> IO CLLong
- Bindings.C: llroundf :: CFloat -> IO CLLong
- Bindings.C: llroundl :: CLDouble -> IO CLLong
- Bindings.C: localeconv :: IO (Ptr Lconv)
- Bindings.C: localtime :: Ptr CTime -> IO (Ptr Tm)
- Bindings.C: log :: CDouble -> IO CDouble
- Bindings.C: log10 :: CDouble -> IO CDouble
- Bindings.C: log10f :: CFloat -> IO CFloat
- Bindings.C: log10l :: CLDouble -> IO CLDouble
- Bindings.C: log1p :: CDouble -> IO CDouble
- Bindings.C: log1pf :: CFloat -> IO CFloat
- Bindings.C: log1pl :: CLDouble -> IO CLDouble
- Bindings.C: log2 :: CDouble -> IO CDouble
- Bindings.C: log2f :: CFloat -> IO CFloat
- Bindings.C: log2l :: CLDouble -> IO CLDouble
- Bindings.C: logb :: CDouble -> IO CDouble
- Bindings.C: logbf :: CFloat -> IO CFloat
- Bindings.C: logbl :: CLDouble -> IO CLDouble
- Bindings.C: logf :: CFloat -> IO CFloat
- Bindings.C: logl :: CLDouble -> IO CLDouble
- Bindings.C: lrint :: CDouble -> IO CLong
- Bindings.C: lrintf :: CFloat -> IO CLong
- Bindings.C: lrintl :: CLDouble -> IO CLong
- Bindings.C: lround :: CDouble -> IO CLong
- Bindings.C: lroundf :: CFloat -> IO CLong
- Bindings.C: lroundl :: CLDouble -> IO CLong
- Bindings.C: malloc :: CSize -> IO (Ptr ())
- Bindings.C: mblen :: CString -> CSize -> IO CInt
- Bindings.C: mbrlen :: CString -> CSize -> Ptr Mbstate_t -> IO CSize
- Bindings.C: mbrtowc :: Ptr CWchar -> CString -> CSize -> Ptr Mbstate_t -> IO CSize
- Bindings.C: mbsinit :: Ptr Mbstate_t -> IO CInt
- Bindings.C: mbsrtowcs :: Ptr CWchar -> Ptr CString -> CSize -> Ptr Mbstate_t -> IO CSize
- Bindings.C: mbstowcs :: Ptr CWchar -> CString -> CSize -> IO CSize
- Bindings.C: mbtowc :: Ptr CWchar -> CString -> CSize -> IO CInt
- Bindings.C: mktime :: Ptr Tm -> IO CTime
- Bindings.C: modf :: CDouble -> Ptr CDouble -> IO CDouble
- Bindings.C: modff :: CFloat -> Ptr CFloat -> IO CFloat
- Bindings.C: modfl :: CLDouble -> Ptr CLDouble -> IO CLDouble
- Bindings.C: nan :: CString -> IO CDouble
- Bindings.C: nanf :: CString -> IO CFloat
- Bindings.C: nanl :: CString -> IO CLDouble
- Bindings.C: nearbyint :: CDouble -> IO CDouble
- Bindings.C: nearbyintf :: CFloat -> IO CFloat
- Bindings.C: nearbyintl :: CLDouble -> IO CLDouble
- Bindings.C: nextafter :: CDouble -> CDouble -> IO CDouble
- Bindings.C: nextafterf :: CFloat -> CFloat -> IO CFloat
- Bindings.C: nextafterl :: CLDouble -> CLDouble -> IO CLDouble
- Bindings.C: nexttoward :: CDouble -> CLDouble -> IO CDouble
- Bindings.C: nexttowardf :: CFloat -> CLDouble -> IO CFloat
- Bindings.C: nexttowardl :: CLDouble -> CLDouble -> IO CLDouble
- Bindings.C: perror :: CString -> IO ()
- Bindings.C: pow :: CDouble -> CDouble -> IO CDouble
- Bindings.C: powf :: CFloat -> CFloat -> IO CFloat
- Bindings.C: powl :: CLDouble -> CLDouble -> IO CLDouble
- Bindings.C: putc :: CInt -> Ptr CFile -> IO CInt
- Bindings.C: putchar :: CInt -> IO CInt
- Bindings.C: puts :: CString -> IO CInt
- Bindings.C: putwc :: CWchar -> Ptr CFile -> IO CWint
- Bindings.C: putwchar :: CWchar -> IO CWint
- Bindings.C: qsort :: Ptr a -> CSize -> CSize -> FunPtr (Ptr a -> Ptr a -> IO CInt) -> IO ()
- Bindings.C: raise :: CInt -> IO CInt
- Bindings.C: rand :: IO CInt
- Bindings.C: realloc :: Ptr () -> CSize -> IO (Ptr ())
- Bindings.C: remainder :: CDouble -> CDouble -> IO CDouble
- Bindings.C: remainderf :: CFloat -> CFloat -> IO CFloat
- Bindings.C: remainderl :: CLDouble -> CLDouble -> IO CLDouble
- Bindings.C: remove :: CString -> IO CInt
- Bindings.C: remquo :: CDouble -> CDouble -> Ptr CInt -> CDouble
- Bindings.C: remquof :: CFloat -> CFloat -> Ptr CInt -> CFloat
- Bindings.C: remquol :: CLDouble -> CLDouble -> Ptr CInt -> CLDouble
- Bindings.C: rename :: CString -> CString -> IO CInt
- Bindings.C: rewind :: Ptr CFile -> IO ()
- Bindings.C: rint :: CDouble -> IO CDouble
- Bindings.C: rintf :: CFloat -> IO CFloat
- Bindings.C: rintl :: CLDouble -> IO CLDouble
- Bindings.C: round :: CDouble -> IO CDouble
- Bindings.C: roundf :: CFloat -> IO CFloat
- Bindings.C: roundl :: CLDouble -> IO CLDouble
- Bindings.C: scalbln :: CDouble -> CLong -> IO CDouble
- Bindings.C: scalblnf :: CFloat -> CLong -> IO CFloat
- Bindings.C: scalblnl :: CLDouble -> CLong -> IO CLDouble
- Bindings.C: scalbn :: CDouble -> CInt -> IO CDouble
- Bindings.C: scalbnf :: CFloat -> CInt -> IO CFloat
- Bindings.C: scalbnl :: CLDouble -> CInt -> IO CLDouble
- Bindings.C: setbuf :: Ptr CFile -> CString -> IO ()
- Bindings.C: setlocale :: CInt -> CString -> IO CString
- Bindings.C: setvbuf :: Ptr CFile -> CString -> CInt -> CSize -> IO CInt
- Bindings.C: signal :: CInt -> IO (FunPtr (CInt -> (CInt -> IO ())))
- Bindings.C: sin :: CDouble -> IO CDouble
- Bindings.C: sinf :: CFloat -> IO CFloat
- Bindings.C: sinh :: CDouble -> IO CDouble
- Bindings.C: sinhf :: CFloat -> IO CFloat
- Bindings.C: sinhl :: CLDouble -> IO CLDouble
- Bindings.C: sinl :: CLDouble -> IO CLDouble
- Bindings.C: sqrt :: CDouble -> IO CDouble
- Bindings.C: sqrtf :: CFloat -> IO CFloat
- Bindings.C: sqrtl :: CLDouble -> IO CLDouble
- Bindings.C: srand :: CUInt -> IO ()
- Bindings.C: strftime :: CString -> CSize -> CString -> Ptr Tm -> IO CSize
- Bindings.C: strtod :: CString -> Ptr CString -> IO CDouble
- Bindings.C: strtof :: CString -> Ptr CString -> IO CFloat
- Bindings.C: strtol :: CString -> Ptr CString -> CInt -> IO CLong
- Bindings.C: strtold :: CString -> Ptr CString -> IO CLDouble
- Bindings.C: strtoll :: CString -> Ptr CString -> CInt -> IO CLLong
- Bindings.C: strtoul :: CString -> Ptr CString -> CInt -> Ptr CULong
- Bindings.C: strtoull :: CString -> Ptr CString -> CInt -> IO CULLong
- Bindings.C: system :: CString -> IO CInt
- Bindings.C: tan :: CDouble -> IO CDouble
- Bindings.C: tanf :: CFloat -> IO CFloat
- Bindings.C: tanh :: CDouble -> IO CDouble
- Bindings.C: tanhf :: CFloat -> IO CFloat
- Bindings.C: tanhl :: CLDouble -> IO CLDouble
- Bindings.C: tanl :: CLDouble -> IO CLDouble
- Bindings.C: tgamma :: CDouble -> IO CDouble
- Bindings.C: tgammaf :: CFloat -> IO CFloat
- Bindings.C: tgammal :: CLDouble -> IO CLDouble
- Bindings.C: time :: Ptr CTime -> IO CTime
- Bindings.C: tm'tm_hour :: Tm -> CInt
- Bindings.C: tm'tm_isdst :: Tm -> CInt
- Bindings.C: tm'tm_mday :: Tm -> CInt
- Bindings.C: tm'tm_min :: Tm -> CInt
- Bindings.C: tm'tm_mon :: Tm -> CInt
- Bindings.C: tm'tm_sec :: Tm -> CInt
- Bindings.C: tm'tm_wday :: Tm -> CInt
- Bindings.C: tm'tm_yday :: Tm -> CInt
- Bindings.C: tm'tm_year :: Tm -> CInt
- Bindings.C: tmpfile :: IO (Ptr CFile)
- Bindings.C: tolower :: CInt -> IO CInt
- Bindings.C: toupper :: CInt -> IO CInt
- Bindings.C: towctrans :: CWint -> CWctrans -> IO CWint
- Bindings.C: towlower :: CWint -> IO CWint
- Bindings.C: towupper :: CWint -> IO CWint
- Bindings.C: trunc :: CDouble -> IO CDouble
- Bindings.C: truncf :: CFloat -> IO CFloat
- Bindings.C: truncl :: CLDouble -> IO CLDouble
- Bindings.C: type CWctrans = Word32
- Bindings.C: type CWctype = Word32
- Bindings.C: type CWint = Word32
- Bindings.C: ungetc :: CInt -> Ptr CFile -> IO CInt
- Bindings.C: ungetwc :: CWint -> Ptr CFile -> IO CWint
- Bindings.C: wcrtomb :: CString -> CWchar -> Ptr Mbstate_t -> IO CSize
- Bindings.C: wcscat :: Ptr CWchar -> Ptr CWchar -> IO CWchar
- Bindings.C: wcschr :: Ptr CWchar -> CWchar -> IO CWchar
- Bindings.C: wcscmp :: Ptr CWchar -> Ptr CWchar -> IO CInt
- Bindings.C: wcscoll :: Ptr CWchar -> Ptr CWchar -> IO CInt
- Bindings.C: wcscpy :: Ptr CWchar -> Ptr CWchar -> IO (Ptr CWchar)
- Bindings.C: wcscspn :: Ptr CWchar -> Ptr CWchar -> IO CSize
- Bindings.C: wcsftime :: Ptr CWchar -> CSize -> Ptr CWchar -> Ptr Tm -> IO CSize
- Bindings.C: wcslen :: Ptr CWchar -> IO CSize
- Bindings.C: wcsncat :: Ptr CWchar -> Ptr CWchar -> CSize -> IO (Ptr CWchar)
- Bindings.C: wcsncmp :: Ptr CWchar -> Ptr CWchar -> CSize -> IO CInt
- Bindings.C: wcsncpy :: Ptr CWchar -> Ptr CWchar -> CSize -> IO (Ptr CWchar)
- Bindings.C: wcspbrk :: Ptr CWchar -> Ptr CWchar -> IO (Ptr CWchar)
- Bindings.C: wcsrchr :: Ptr CWchar -> CWchar -> IO (Ptr CWchar)
- Bindings.C: wcsrtombs :: CString -> Ptr (Ptr CWchar) -> CSize -> Ptr Mbstate_t -> IO CSize
- Bindings.C: wcsspn :: Ptr CWchar -> Ptr CWchar -> IO CSize
- Bindings.C: wcsstr :: Ptr CWchar -> Ptr CWchar -> IO (Ptr CWchar)
- Bindings.C: wcstod :: Ptr CWchar -> Ptr (Ptr CWchar) -> IO CDouble
- Bindings.C: wcstof :: Ptr CWchar -> Ptr (Ptr CWchar) -> IO CFloat
- Bindings.C: wcstok :: Ptr CWchar -> Ptr CWchar -> Ptr (Ptr CWchar) -> IO (Ptr CWchar)
- Bindings.C: wcstol :: Ptr CWchar -> Ptr (Ptr CWchar) -> CInt -> CLong
- Bindings.C: wcstold :: Ptr CWchar -> Ptr (Ptr CWchar) -> IO CLDouble
- Bindings.C: wcstoll :: Ptr CWchar -> Ptr (Ptr CWchar) -> CInt -> IO CLLong
- Bindings.C: wcstombs :: CString -> Ptr CWchar -> CSize -> IO CSize
- Bindings.C: wcstoul :: Ptr CWchar -> Ptr (Ptr CWchar) -> CInt -> IO CULong
- Bindings.C: wcstoull :: Ptr CWchar -> Ptr (Ptr CWchar) -> CInt -> IO CULLong
- Bindings.C: wcsxfrm :: Ptr CWchar -> Ptr CWchar -> CSize -> IO CSize
- Bindings.C: wctob :: CWint -> IO CInt
- Bindings.C: wctomb :: CString -> CWchar -> IO CInt
- Bindings.C: wctrans :: CString -> IO CWctrans
- Bindings.C: wctype :: CString -> IO CWctype
- Bindings.C: wmemchr :: Ptr CWchar -> CWchar -> CSize -> IO (Ptr CWchar)
- Bindings.C: wmemcmp :: Ptr CWchar -> Ptr CWchar -> CSize -> IO CInt
- Bindings.C: wmemcpy :: Ptr CWchar -> Ptr CWchar -> CSize -> IO (Ptr CWchar)
- Bindings.C: wmemmove :: Ptr CWchar -> Ptr CWchar -> CSize -> IO (Ptr CWchar)
- Bindings.C: wmemset :: Ptr CWchar -> CWchar -> CSize -> IO (Ptr CWchar)
- Bindings.Utilities: class (Storable cb) => Callback cb where { type family F cb :: *; { withCallback f c = do made <- makeCallback f result <- c made freeCallback made return result } }
- Bindings.Utilities: data (Storable a) => GlobalVariable a
- Bindings.Utilities: freeCallback :: (Callback cb) => cb -> IO ()
- Bindings.Utilities: makeCallback :: (Callback cb) => F cb -> IO cb
- Bindings.Utilities: nullCallback :: (Callback cb) => cb
- Bindings.Utilities: readGlobalVariable :: (Storable a) => GlobalVariable a -> IO a
- Bindings.Utilities: withCallback :: (Callback cb) => F cb -> (cb -> IO a) -> IO a
- Bindings.Utilities: writeGlobalVariable :: (Storable a) => GlobalVariable a -> a -> IO ()
+ Bindings.C.Errno: c'EDOM :: (Num a) => a
+ Bindings.C.Errno: c'EILSEQ :: (Num a) => a
+ Bindings.C.Errno: c'ERANGE :: (Num a) => a
+ Bindings.C.Math: c'FP_ILOGB0 :: (Num a) => a
+ Bindings.C.Math: c'FP_ILOGBNAN :: (Num a) => a
+ Bindings.C.Math: c'FP_INFINITE :: (Num a) => a
+ Bindings.C.Math: c'FP_NAN :: (Num a) => a
+ Bindings.C.Math: c'FP_NORMAL :: (Num a) => a
+ Bindings.C.Math: c'FP_SUBNORMAL :: (Num a) => a
+ Bindings.C.Math: c'FP_ZERO :: (Num a) => a
+ Bindings.C.Math: c'MATH_ERREXCEPT :: (Num a) => a
+ Bindings.C.Math: c'MATH_ERRNO :: (Num a) => a
+ Bindings.C.Math: c'acos :: CDouble -> IO CDouble
+ Bindings.C.Math: c'acosf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'acosh :: CDouble -> IO CDouble
+ Bindings.C.Math: c'acoshf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'acoshl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'acosl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'asin :: CDouble -> IO CDouble
+ Bindings.C.Math: c'asinf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'asinh :: CDouble -> IO CDouble
+ Bindings.C.Math: c'asinhf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'asinhl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'asinl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'atan :: CDouble -> IO CDouble
+ Bindings.C.Math: c'atan2 :: CDouble -> CDouble -> IO CDouble
+ Bindings.C.Math: c'atan2f :: CFloat -> CFloat -> IO CFloat
+ Bindings.C.Math: c'atan2l :: CLDouble -> CLDouble -> IO CLDouble
+ Bindings.C.Math: c'atanf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'atanh :: CDouble -> IO CDouble
+ Bindings.C.Math: c'atanhf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'atanhl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'atanl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'cbrt :: CDouble -> IO CDouble
+ Bindings.C.Math: c'cbrtf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'cbrtl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'ceil :: CDouble -> IO CDouble
+ Bindings.C.Math: c'ceilf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'ceill :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'copysign :: CDouble -> CDouble -> IO CDouble
+ Bindings.C.Math: c'copysignf :: CFloat -> CFloat -> IO CFloat
+ Bindings.C.Math: c'copysignl :: CLDouble -> CLDouble -> IO CLDouble
+ Bindings.C.Math: c'cos :: CDouble -> IO CDouble
+ Bindings.C.Math: c'cosf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'cosh :: CDouble -> IO CDouble
+ Bindings.C.Math: c'coshf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'coshl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'cosl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'erf :: CDouble -> IO CDouble
+ Bindings.C.Math: c'erfc :: CDouble -> IO CDouble
+ Bindings.C.Math: c'erfcf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'erfcl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'erff :: CFloat -> IO CFloat
+ Bindings.C.Math: c'erfl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'exp :: CDouble -> IO CDouble
+ Bindings.C.Math: c'exp2 :: CDouble -> IO CDouble
+ Bindings.C.Math: c'exp2f :: CFloat -> IO CFloat
+ Bindings.C.Math: c'exp2l :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'expf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'expl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'expm1 :: CDouble -> IO CDouble
+ Bindings.C.Math: c'expm1f :: CFloat -> IO CFloat
+ Bindings.C.Math: c'expm1l :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'fabs :: CDouble -> IO CDouble
+ Bindings.C.Math: c'fabsf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'fabsl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'fdim :: CDouble -> CDouble -> IO CDouble
+ Bindings.C.Math: c'fdimf :: CFloat -> CFloat -> IO CFloat
+ Bindings.C.Math: c'fdiml :: CLDouble -> CLDouble -> IO CLDouble
+ Bindings.C.Math: c'floor :: CDouble -> IO CDouble
+ Bindings.C.Math: c'floorf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'floorl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'fma :: CDouble -> CDouble -> CDouble -> IO CDouble
+ Bindings.C.Math: c'fmaf :: CFloat -> CFloat -> CFloat -> IO CFloat
+ Bindings.C.Math: c'fmal :: CLDouble -> CLDouble -> CLDouble -> IO CLDouble
+ Bindings.C.Math: c'fmax :: CDouble -> CDouble -> IO CDouble
+ Bindings.C.Math: c'fmaxf :: CFloat -> CFloat -> IO CFloat
+ Bindings.C.Math: c'fmaxl :: CLDouble -> CLDouble -> IO CLDouble
+ Bindings.C.Math: c'fmin :: CDouble -> CDouble -> IO CDouble
+ Bindings.C.Math: c'fminf :: CFloat -> CFloat -> IO CFloat
+ Bindings.C.Math: c'fminl :: CLDouble -> CLDouble -> IO CLDouble
+ Bindings.C.Math: c'fmod :: CDouble -> CDouble -> IO CDouble
+ Bindings.C.Math: c'fmodf :: CFloat -> CFloat -> IO CFloat
+ Bindings.C.Math: c'fmodl :: CLDouble -> CLDouble -> IO CLDouble
+ Bindings.C.Math: c'frexp :: CDouble -> Ptr CInt -> IO CDouble
+ Bindings.C.Math: c'frexpf :: CFloat -> Ptr CInt -> IO CFloat
+ Bindings.C.Math: c'frexpl :: CLDouble -> Ptr CInt -> IO CLDouble
+ Bindings.C.Math: c'hypot :: CDouble -> CDouble -> IO CDouble
+ Bindings.C.Math: c'hypotf :: CFloat -> CFloat -> IO CFloat
+ Bindings.C.Math: c'hypotl :: CLDouble -> CLDouble -> IO CLDouble
+ Bindings.C.Math: c'ilogb :: CDouble -> IO CInt
+ Bindings.C.Math: c'ilogbf :: CFloat -> IO CInt
+ Bindings.C.Math: c'ilogbl :: CLDouble -> IO CInt
+ Bindings.C.Math: c'ldexp :: CDouble -> CInt -> IO CDouble
+ Bindings.C.Math: c'ldexpf :: CFloat -> CInt -> IO CFloat
+ Bindings.C.Math: c'ldexpl :: CLDouble -> CInt -> IO CLDouble
+ Bindings.C.Math: c'lgamma :: CDouble -> IO CDouble
+ Bindings.C.Math: c'lgammaf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'lgammal :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'llrint :: CDouble -> IO CLLong
+ Bindings.C.Math: c'llrintf :: CFloat -> IO CLLong
+ Bindings.C.Math: c'llrintl :: CLDouble -> IO CLLong
+ Bindings.C.Math: c'llround :: CDouble -> IO CLLong
+ Bindings.C.Math: c'llroundf :: CFloat -> IO CLLong
+ Bindings.C.Math: c'llroundl :: CLDouble -> IO CLLong
+ Bindings.C.Math: c'log :: CDouble -> IO CDouble
+ Bindings.C.Math: c'log10 :: CDouble -> IO CDouble
+ Bindings.C.Math: c'log10f :: CFloat -> IO CFloat
+ Bindings.C.Math: c'log10l :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'log1p :: CDouble -> IO CDouble
+ Bindings.C.Math: c'log1pf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'log1pl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'log2 :: CDouble -> IO CDouble
+ Bindings.C.Math: c'log2f :: CFloat -> IO CFloat
+ Bindings.C.Math: c'log2l :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'logb :: CDouble -> IO CDouble
+ Bindings.C.Math: c'logbf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'logbl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'logf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'logl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'lrint :: CDouble -> IO CLong
+ Bindings.C.Math: c'lrintf :: CFloat -> IO CLong
+ Bindings.C.Math: c'lrintl :: CLDouble -> IO CLong
+ Bindings.C.Math: c'lround :: CDouble -> IO CLong
+ Bindings.C.Math: c'lroundf :: CFloat -> IO CLong
+ Bindings.C.Math: c'lroundl :: CLDouble -> IO CLong
+ Bindings.C.Math: c'modf :: CDouble -> Ptr CDouble -> IO CDouble
+ Bindings.C.Math: c'modff :: CFloat -> Ptr CFloat -> IO CFloat
+ Bindings.C.Math: c'modfl :: CLDouble -> Ptr CLDouble -> IO CLDouble
+ Bindings.C.Math: c'nan :: CString -> IO CDouble
+ Bindings.C.Math: c'nanf :: CString -> IO CFloat
+ Bindings.C.Math: c'nanl :: CString -> IO CLDouble
+ Bindings.C.Math: c'nearbyint :: CDouble -> IO CDouble
+ Bindings.C.Math: c'nearbyintf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'nearbyintl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'nextafter :: CDouble -> CDouble -> IO CDouble
+ Bindings.C.Math: c'nextafterf :: CFloat -> CFloat -> IO CFloat
+ Bindings.C.Math: c'nextafterl :: CLDouble -> CLDouble -> IO CLDouble
+ Bindings.C.Math: c'nexttoward :: CDouble -> CLDouble -> IO CDouble
+ Bindings.C.Math: c'nexttowardf :: CFloat -> CLDouble -> IO CFloat
+ Bindings.C.Math: c'nexttowardl :: CLDouble -> CLDouble -> IO CLDouble
+ Bindings.C.Math: c'pow :: CDouble -> CDouble -> IO CDouble
+ Bindings.C.Math: c'powf :: CFloat -> CFloat -> IO CFloat
+ Bindings.C.Math: c'powl :: CLDouble -> CLDouble -> IO CLDouble
+ Bindings.C.Math: c'remainder :: CDouble -> CDouble -> IO CDouble
+ Bindings.C.Math: c'remainderf :: CFloat -> CFloat -> IO CFloat
+ Bindings.C.Math: c'remainderl :: CLDouble -> CLDouble -> IO CLDouble
+ Bindings.C.Math: c'remquo :: CDouble -> CDouble -> Ptr CInt -> IO CDouble
+ Bindings.C.Math: c'remquof :: CFloat -> CFloat -> Ptr CInt -> IO CFloat
+ Bindings.C.Math: c'remquol :: CLDouble -> CLDouble -> Ptr CInt -> IO CLDouble
+ Bindings.C.Math: c'rint :: CDouble -> IO CDouble
+ Bindings.C.Math: c'rintf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'rintl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'round :: CDouble -> IO CDouble
+ Bindings.C.Math: c'roundf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'roundl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'scalbln :: CDouble -> CLong -> IO CDouble
+ Bindings.C.Math: c'scalblnf :: CFloat -> CLong -> IO CFloat
+ Bindings.C.Math: c'scalblnl :: CLDouble -> CLong -> IO CLDouble
+ Bindings.C.Math: c'scalbn :: CDouble -> CInt -> IO CDouble
+ Bindings.C.Math: c'scalbnf :: CFloat -> CInt -> IO CFloat
+ Bindings.C.Math: c'scalbnl :: CLDouble -> CInt -> IO CLDouble
+ Bindings.C.Math: c'sin :: CDouble -> IO CDouble
+ Bindings.C.Math: c'sinf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'sinh :: CDouble -> IO CDouble
+ Bindings.C.Math: c'sinhf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'sinhl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'sinl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'sqrt :: CDouble -> IO CDouble
+ Bindings.C.Math: c'sqrtf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'sqrtl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'tan :: CDouble -> IO CDouble
+ Bindings.C.Math: c'tanf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'tanh :: CDouble -> IO CDouble
+ Bindings.C.Math: c'tanhf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'tanhl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'tanl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'tgamma :: CDouble -> IO CDouble
+ Bindings.C.Math: c'tgammaf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'tgammal :: CLDouble -> IO CLDouble
+ Bindings.C.Math: c'trunc :: CDouble -> IO CDouble
+ Bindings.C.Math: c'truncf :: CFloat -> IO CFloat
+ Bindings.C.Math: c'truncl :: CLDouble -> IO CLDouble
+ Bindings.C.Math: p'acos :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'acosf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'acosh :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'acoshf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'acoshl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'acosl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'asin :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'asinf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'asinh :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'asinhf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'asinhl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'asinl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'atan :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'atan2 :: FunPtr (CDouble -> CDouble -> IO CDouble)
+ Bindings.C.Math: p'atan2f :: FunPtr (CFloat -> CFloat -> IO CFloat)
+ Bindings.C.Math: p'atan2l :: FunPtr (CLDouble -> CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'atanf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'atanh :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'atanhf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'atanhl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'atanl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'cbrt :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'cbrtf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'cbrtl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'ceil :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'ceilf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'ceill :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'copysign :: FunPtr (CDouble -> CDouble -> IO CDouble)
+ Bindings.C.Math: p'copysignf :: FunPtr (CFloat -> CFloat -> IO CFloat)
+ Bindings.C.Math: p'copysignl :: FunPtr (CLDouble -> CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'cos :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'cosf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'cosh :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'coshf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'coshl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'cosl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'erf :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'erfc :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'erfcf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'erfcl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'erff :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'erfl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'exp :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'exp2 :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'exp2f :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'exp2l :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'expf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'expl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'expm1 :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'expm1f :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'expm1l :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'fabs :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'fabsf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'fabsl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'fdim :: FunPtr (CDouble -> CDouble -> IO CDouble)
+ Bindings.C.Math: p'fdimf :: FunPtr (CFloat -> CFloat -> IO CFloat)
+ Bindings.C.Math: p'fdiml :: FunPtr (CLDouble -> CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'floor :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'floorf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'floorl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'fma :: FunPtr (CDouble -> CDouble -> CDouble -> IO CDouble)
+ Bindings.C.Math: p'fmaf :: FunPtr (CFloat -> CFloat -> CFloat -> IO CFloat)
+ Bindings.C.Math: p'fmal :: FunPtr (CLDouble -> CLDouble -> CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'fmax :: FunPtr (CDouble -> CDouble -> IO CDouble)
+ Bindings.C.Math: p'fmaxf :: FunPtr (CFloat -> CFloat -> IO CFloat)
+ Bindings.C.Math: p'fmaxl :: FunPtr (CLDouble -> CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'fmin :: FunPtr (CDouble -> CDouble -> IO CDouble)
+ Bindings.C.Math: p'fminf :: FunPtr (CFloat -> CFloat -> IO CFloat)
+ Bindings.C.Math: p'fminl :: FunPtr (CLDouble -> CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'fmod :: FunPtr (CDouble -> CDouble -> IO CDouble)
+ Bindings.C.Math: p'fmodf :: FunPtr (CFloat -> CFloat -> IO CFloat)
+ Bindings.C.Math: p'fmodl :: FunPtr (CLDouble -> CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'frexp :: FunPtr (CDouble -> Ptr CInt -> IO CDouble)
+ Bindings.C.Math: p'frexpf :: FunPtr (CFloat -> Ptr CInt -> IO CFloat)
+ Bindings.C.Math: p'frexpl :: FunPtr (CLDouble -> Ptr CInt -> IO CLDouble)
+ Bindings.C.Math: p'hypot :: FunPtr (CDouble -> CDouble -> IO CDouble)
+ Bindings.C.Math: p'hypotf :: FunPtr (CFloat -> CFloat -> IO CFloat)
+ Bindings.C.Math: p'hypotl :: FunPtr (CLDouble -> CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'ilogb :: FunPtr (CDouble -> IO CInt)
+ Bindings.C.Math: p'ilogbf :: FunPtr (CFloat -> IO CInt)
+ Bindings.C.Math: p'ilogbl :: FunPtr (CLDouble -> IO CInt)
+ Bindings.C.Math: p'ldexp :: FunPtr (CDouble -> CInt -> IO CDouble)
+ Bindings.C.Math: p'ldexpf :: FunPtr (CFloat -> CInt -> IO CFloat)
+ Bindings.C.Math: p'ldexpl :: FunPtr (CLDouble -> CInt -> IO CLDouble)
+ Bindings.C.Math: p'lgamma :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'lgammaf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'lgammal :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'llrint :: FunPtr (CDouble -> IO CLLong)
+ Bindings.C.Math: p'llrintf :: FunPtr (CFloat -> IO CLLong)
+ Bindings.C.Math: p'llrintl :: FunPtr (CLDouble -> IO CLLong)
+ Bindings.C.Math: p'llround :: FunPtr (CDouble -> IO CLLong)
+ Bindings.C.Math: p'llroundf :: FunPtr (CFloat -> IO CLLong)
+ Bindings.C.Math: p'llroundl :: FunPtr (CLDouble -> IO CLLong)
+ Bindings.C.Math: p'log :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'log10 :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'log10f :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'log10l :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'log1p :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'log1pf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'log1pl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'log2 :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'log2f :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'log2l :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'logb :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'logbf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'logbl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'logf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'logl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'lrint :: FunPtr (CDouble -> IO CLong)
+ Bindings.C.Math: p'lrintf :: FunPtr (CFloat -> IO CLong)
+ Bindings.C.Math: p'lrintl :: FunPtr (CLDouble -> IO CLong)
+ Bindings.C.Math: p'lround :: FunPtr (CDouble -> IO CLong)
+ Bindings.C.Math: p'lroundf :: FunPtr (CFloat -> IO CLong)
+ Bindings.C.Math: p'lroundl :: FunPtr (CLDouble -> IO CLong)
+ Bindings.C.Math: p'modf :: FunPtr (CDouble -> Ptr CDouble -> IO CDouble)
+ Bindings.C.Math: p'modff :: FunPtr (CFloat -> Ptr CFloat -> IO CFloat)
+ Bindings.C.Math: p'modfl :: FunPtr (CLDouble -> Ptr CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'nan :: FunPtr (CString -> IO CDouble)
+ Bindings.C.Math: p'nanf :: FunPtr (CString -> IO CFloat)
+ Bindings.C.Math: p'nanl :: FunPtr (CString -> IO CLDouble)
+ Bindings.C.Math: p'nearbyint :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'nearbyintf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'nearbyintl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'nextafter :: FunPtr (CDouble -> CDouble -> IO CDouble)
+ Bindings.C.Math: p'nextafterf :: FunPtr (CFloat -> CFloat -> IO CFloat)
+ Bindings.C.Math: p'nextafterl :: FunPtr (CLDouble -> CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'nexttoward :: FunPtr (CDouble -> CLDouble -> IO CDouble)
+ Bindings.C.Math: p'nexttowardf :: FunPtr (CFloat -> CLDouble -> IO CFloat)
+ Bindings.C.Math: p'nexttowardl :: FunPtr (CLDouble -> CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'pow :: FunPtr (CDouble -> CDouble -> IO CDouble)
+ Bindings.C.Math: p'powf :: FunPtr (CFloat -> CFloat -> IO CFloat)
+ Bindings.C.Math: p'powl :: FunPtr (CLDouble -> CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'remainder :: FunPtr (CDouble -> CDouble -> IO CDouble)
+ Bindings.C.Math: p'remainderf :: FunPtr (CFloat -> CFloat -> IO CFloat)
+ Bindings.C.Math: p'remainderl :: FunPtr (CLDouble -> CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'remquo :: FunPtr (CDouble -> CDouble -> Ptr CInt -> IO CDouble)
+ Bindings.C.Math: p'remquof :: FunPtr (CFloat -> CFloat -> Ptr CInt -> IO CFloat)
+ Bindings.C.Math: p'remquol :: FunPtr (CLDouble -> CLDouble -> Ptr CInt -> IO CLDouble)
+ Bindings.C.Math: p'rint :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'rintf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'rintl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'round :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'roundf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'roundl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'scalbln :: FunPtr (CDouble -> CLong -> IO CDouble)
+ Bindings.C.Math: p'scalblnf :: FunPtr (CFloat -> CLong -> IO CFloat)
+ Bindings.C.Math: p'scalblnl :: FunPtr (CLDouble -> CLong -> IO CLDouble)
+ Bindings.C.Math: p'scalbn :: FunPtr (CDouble -> CInt -> IO CDouble)
+ Bindings.C.Math: p'scalbnf :: FunPtr (CFloat -> CInt -> IO CFloat)
+ Bindings.C.Math: p'scalbnl :: FunPtr (CLDouble -> CInt -> IO CLDouble)
+ Bindings.C.Math: p'sin :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'sinf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'sinh :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'sinhf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'sinhl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'sinl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'sqrt :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'sqrtf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'sqrtl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'tan :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'tanf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'tanh :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'tanhf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'tanhl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'tanl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'tgamma :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'tgammaf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'tgammal :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Math: p'trunc :: FunPtr (CDouble -> IO CDouble)
+ Bindings.C.Math: p'truncf :: FunPtr (CFloat -> IO CFloat)
+ Bindings.C.Math: p'truncl :: FunPtr (CLDouble -> IO CLDouble)
+ Bindings.C.Stddef: c'NULL :: Ptr a
+ Bindings.C.Stdio: c'BUFSIZ :: (Num a) => a
+ Bindings.C.Stdio: c'EOF :: (Num a) => a
+ Bindings.C.Stdio: c'FILENAME_MAX :: (Num a) => a
+ Bindings.C.Stdio: c'FOPEN_MAX :: (Num a) => a
+ Bindings.C.Stdio: c'L_tmpnam :: (Num a) => a
+ Bindings.C.Stdio: c'SEEK_CUR :: (Num a) => a
+ Bindings.C.Stdio: c'SEEK_END :: (Num a) => a
+ Bindings.C.Stdio: c'SEEK_SET :: (Num a) => a
+ Bindings.C.Stdio: c'TMP_MAX :: (Num a) => a
+ Bindings.C.Stdio: c'_IOFBF :: (Num a) => a
+ Bindings.C.Stdio: c'_IOLBF :: (Num a) => a
+ Bindings.C.Stdio: c'_IONBF :: (Num a) => a
+ Bindings.C.Stdio: c'clearerr :: Ptr CFile -> IO ()
+ Bindings.C.Stdio: c'fclose :: Ptr CFile -> IO CInt
+ Bindings.C.Stdio: c'feof :: Ptr CFile -> IO CInt
+ Bindings.C.Stdio: c'ferror :: Ptr CFile -> IO CInt
+ Bindings.C.Stdio: c'fflush :: Ptr CFile -> IO CInt
+ Bindings.C.Stdio: c'fgetc :: Ptr CFile -> IO CInt
+ Bindings.C.Stdio: c'fgetpos :: Ptr CFile -> Ptr CFpos -> IO CInt
+ Bindings.C.Stdio: c'fgets :: CString -> CInt -> Ptr CFile -> IO CString
+ Bindings.C.Stdio: c'fopen :: CString -> CString -> IO (Ptr CFile)
+ Bindings.C.Stdio: c'fputc :: CInt -> Ptr CFile -> IO CInt
+ Bindings.C.Stdio: c'fputs :: CString -> Ptr CFile -> IO CInt
+ Bindings.C.Stdio: c'fread :: Ptr () -> CSize -> CSize -> Ptr CFile -> IO CSize
+ Bindings.C.Stdio: c'freopen :: CString -> CString -> Ptr CFile -> IO (Ptr CFile)
+ Bindings.C.Stdio: c'fseek :: Ptr CFile -> CLong -> CInt -> IO CInt
+ Bindings.C.Stdio: c'fsetpos :: Ptr CFile -> Ptr CFpos -> IO CInt
+ Bindings.C.Stdio: c'ftell :: Ptr CFile -> IO CLong
+ Bindings.C.Stdio: c'fwrite :: Ptr () -> CSize -> CSize -> Ptr CFile -> IO CSize
+ Bindings.C.Stdio: c'getc :: Ptr CFile -> IO CInt
+ Bindings.C.Stdio: c'getchar :: IO CInt
+ Bindings.C.Stdio: c'perror :: CString -> IO ()
+ Bindings.C.Stdio: c'putc :: CInt -> Ptr CFile -> IO CInt
+ Bindings.C.Stdio: c'putchar :: CInt -> IO CInt
+ Bindings.C.Stdio: c'puts :: CString -> IO CInt
+ Bindings.C.Stdio: c'remove :: CString -> IO CInt
+ Bindings.C.Stdio: c'rename :: CString -> CString -> IO CInt
+ Bindings.C.Stdio: c'rewind :: Ptr CFile -> IO ()
+ Bindings.C.Stdio: c'setbuf :: Ptr CFile -> CString -> IO ()
+ Bindings.C.Stdio: c'setvbuf :: Ptr CFile -> CString -> CInt -> CSize -> IO CInt
+ Bindings.C.Stdio: c'tmpfile :: IO (Ptr CFile)
+ Bindings.C.Stdio: c'ungetc :: CInt -> Ptr CFile -> IO CInt
+ Bindings.C.Stdio: p'clearerr :: FunPtr (Ptr CFile -> IO ())
+ Bindings.C.Stdio: p'fclose :: FunPtr (Ptr CFile -> IO CInt)
+ Bindings.C.Stdio: p'feof :: FunPtr (Ptr CFile -> IO CInt)
+ Bindings.C.Stdio: p'ferror :: FunPtr (Ptr CFile -> IO CInt)
+ Bindings.C.Stdio: p'fflush :: FunPtr (Ptr CFile -> IO CInt)
+ Bindings.C.Stdio: p'fgetc :: FunPtr (Ptr CFile -> IO CInt)
+ Bindings.C.Stdio: p'fgetpos :: FunPtr (Ptr CFile -> Ptr CFpos -> IO CInt)
+ Bindings.C.Stdio: p'fgets :: FunPtr (CString -> CInt -> Ptr CFile -> IO CString)
+ Bindings.C.Stdio: p'fopen :: FunPtr (CString -> CString -> IO (Ptr CFile))
+ Bindings.C.Stdio: p'fputc :: FunPtr (CInt -> Ptr CFile -> IO CInt)
+ Bindings.C.Stdio: p'fputs :: FunPtr (CString -> Ptr CFile -> IO CInt)
+ Bindings.C.Stdio: p'fread :: FunPtr (Ptr () -> CSize -> CSize -> Ptr CFile -> IO CSize)
+ Bindings.C.Stdio: p'freopen :: FunPtr (CString -> CString -> Ptr CFile -> IO (Ptr CFile))
+ Bindings.C.Stdio: p'fseek :: FunPtr (Ptr CFile -> CLong -> CInt -> IO CInt)
+ Bindings.C.Stdio: p'fsetpos :: FunPtr (Ptr CFile -> Ptr CFpos -> IO CInt)
+ Bindings.C.Stdio: p'ftell :: FunPtr (Ptr CFile -> IO CLong)
+ Bindings.C.Stdio: p'fwrite :: FunPtr (Ptr () -> CSize -> CSize -> Ptr CFile -> IO CSize)
+ Bindings.C.Stdio: p'getc :: FunPtr (Ptr CFile -> IO CInt)
+ Bindings.C.Stdio: p'getchar :: FunPtr (IO CInt)
+ Bindings.C.Stdio: p'perror :: FunPtr (CString -> IO ())
+ Bindings.C.Stdio: p'putc :: FunPtr (CInt -> Ptr CFile -> IO CInt)
+ Bindings.C.Stdio: p'putchar :: FunPtr (CInt -> IO CInt)
+ Bindings.C.Stdio: p'puts :: FunPtr (CString -> IO CInt)
+ Bindings.C.Stdio: p'remove :: FunPtr (CString -> IO CInt)
+ Bindings.C.Stdio: p'rename :: FunPtr (CString -> CString -> IO CInt)
+ Bindings.C.Stdio: p'rewind :: FunPtr (Ptr CFile -> IO ())
+ Bindings.C.Stdio: p'setbuf :: FunPtr (Ptr CFile -> CString -> IO ())
+ Bindings.C.Stdio: p'setvbuf :: FunPtr (Ptr CFile -> CString -> CInt -> CSize -> IO CInt)
+ Bindings.C.Stdio: p'tmpfile :: FunPtr (IO (Ptr CFile))
+ Bindings.C.Stdio: p'ungetc :: FunPtr (CInt -> Ptr CFile -> IO CInt)
+ Bindings.C.String: c'memchr :: Ptr () -> CInt -> CSize -> IO (Ptr ())
+ Bindings.C.String: c'memcmp :: Ptr () -> Ptr () -> CSize -> IO CInt
+ Bindings.C.String: c'memcpy :: Ptr () -> Ptr () -> CSize -> IO (Ptr ())
+ Bindings.C.String: c'memmove :: Ptr () -> Ptr () -> CSize -> IO (Ptr ())
+ Bindings.C.String: c'memset :: Ptr () -> CInt -> CSize -> IO (Ptr ())
+ Bindings.C.String: c'strcat :: CString -> CString -> IO CString
+ Bindings.C.String: c'strchr :: CString -> CInt -> IO CString
+ Bindings.C.String: c'strcmp :: CString -> CString -> IO CInt
+ Bindings.C.String: c'strcoll :: CString -> CString -> IO CInt
+ Bindings.C.String: c'strcpy :: CString -> CString -> IO CString
+ Bindings.C.String: c'strcspn :: CString -> CString -> IO CSize
+ Bindings.C.String: c'strerror :: CInt -> IO CString
+ Bindings.C.String: c'strlen :: CString -> IO CSize
+ Bindings.C.String: c'strncat :: CString -> CString -> CSize -> IO CString
+ Bindings.C.String: c'strncmp :: CString -> CString -> CSize -> IO CInt
+ Bindings.C.String: c'strncpy :: CString -> CString -> CSize -> IO CString
+ Bindings.C.String: c'strpbrk :: CString -> CString -> IO CString
+ Bindings.C.String: c'strrchr :: CString -> CInt -> IO CString
+ Bindings.C.String: c'strspn :: CString -> CString -> IO CSize
+ Bindings.C.String: c'strstr :: CString -> CString -> IO CString
+ Bindings.C.String: c'strtok :: CString -> CString -> IO CString
+ Bindings.C.String: c'strxfrm :: CString -> CString -> CSize -> IO CSize
+ Bindings.C.String: p'memchr :: FunPtr (Ptr () -> CInt -> CSize -> IO (Ptr ()))
+ Bindings.C.String: p'memcmp :: FunPtr (Ptr () -> Ptr () -> CSize -> IO CInt)
+ Bindings.C.String: p'memcpy :: FunPtr (Ptr () -> Ptr () -> CSize -> IO (Ptr ()))
+ Bindings.C.String: p'memmove :: FunPtr (Ptr () -> Ptr () -> CSize -> IO (Ptr ()))
+ Bindings.C.String: p'memset :: FunPtr (Ptr () -> CInt -> CSize -> IO (Ptr ()))
+ Bindings.C.String: p'strcat :: FunPtr (CString -> CString -> IO CString)
+ Bindings.C.String: p'strchr :: FunPtr (CString -> CInt -> IO CString)
+ Bindings.C.String: p'strcmp :: FunPtr (CString -> CString -> IO CInt)
+ Bindings.C.String: p'strcoll :: FunPtr (CString -> CString -> IO CInt)
+ Bindings.C.String: p'strcpy :: FunPtr (CString -> CString -> IO CString)
+ Bindings.C.String: p'strcspn :: FunPtr (CString -> CString -> IO CSize)
+ Bindings.C.String: p'strerror :: FunPtr (CInt -> IO CString)
+ Bindings.C.String: p'strlen :: FunPtr (CString -> IO CSize)
+ Bindings.C.String: p'strncat :: FunPtr (CString -> CString -> CSize -> IO CString)
+ Bindings.C.String: p'strncmp :: FunPtr (CString -> CString -> CSize -> IO CInt)
+ Bindings.C.String: p'strncpy :: FunPtr (CString -> CString -> CSize -> IO CString)
+ Bindings.C.String: p'strpbrk :: FunPtr (CString -> CString -> IO CString)
+ Bindings.C.String: p'strrchr :: FunPtr (CString -> CInt -> IO CString)
+ Bindings.C.String: p'strspn :: FunPtr (CString -> CString -> IO CSize)
+ Bindings.C.String: p'strstr :: FunPtr (CString -> CString -> IO CString)
+ Bindings.C.String: p'strtok :: FunPtr (CString -> CString -> IO CString)
+ Bindings.C.String: p'strxfrm :: FunPtr (CString -> CString -> CSize -> IO CSize)
+ Bindings.C.Time: C'tm :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> C'tm
+ Bindings.C.Time: c'CLOCKS_PER_SEC :: (Num a) => a
+ Bindings.C.Time: c'TIMER_ABSTIME :: (Num a) => a
+ Bindings.C.Time: c'clock :: IO C'clock_t
+ Bindings.C.Time: c'difftime :: C'time_t -> C'time_t -> IO CDouble
+ Bindings.C.Time: c'gmtime :: Ptr C'time_t -> IO (Ptr C'tm)
+ Bindings.C.Time: c'localtime :: Ptr C'time_t -> IO (Ptr C'tm)
+ Bindings.C.Time: c'mktime :: Ptr C'tm -> IO C'time_t
+ Bindings.C.Time: c'strftime :: CString -> CSize -> CString -> Ptr C'tm -> IO CSize
+ Bindings.C.Time: c'time :: Ptr C'time_t -> IO C'time_t
+ Bindings.C.Time: data C'tm
+ Bindings.C.Time: instance Storable C'tm
+ Bindings.C.Time: p'clock :: FunPtr (IO C'clock_t)
+ Bindings.C.Time: p'difftime :: FunPtr (C'time_t -> C'time_t -> IO CDouble)
+ Bindings.C.Time: p'gmtime :: FunPtr (Ptr C'time_t -> IO (Ptr C'tm))
+ Bindings.C.Time: p'localtime :: FunPtr (Ptr C'time_t -> IO (Ptr C'tm))
+ Bindings.C.Time: p'mktime :: FunPtr (Ptr C'tm -> IO C'time_t)
+ Bindings.C.Time: p'strftime :: FunPtr (CString -> CSize -> CString -> Ptr C'tm -> IO CSize)
+ Bindings.C.Time: p'time :: FunPtr (Ptr C'time_t -> IO C'time_t)
+ Bindings.C.Time: tm'tm_hour :: C'tm -> CInt
+ Bindings.C.Time: tm'tm_isdst :: C'tm -> CInt
+ Bindings.C.Time: tm'tm_mday :: C'tm -> CInt
+ Bindings.C.Time: tm'tm_min :: C'tm -> CInt
+ Bindings.C.Time: tm'tm_mon :: C'tm -> CInt
+ Bindings.C.Time: tm'tm_sec :: C'tm -> CInt
+ Bindings.C.Time: tm'tm_wday :: C'tm -> CInt
+ Bindings.C.Time: tm'tm_yday :: C'tm -> CInt
+ Bindings.C.Time: tm'tm_year :: C'tm -> CInt
+ Bindings.C.Time: type C'clock_t = Int32
+ Bindings.C.Time: type C'time_t = Int32
Files
- .hg_archival.txt +1/−1
- .hgtags +1/−6
- bindings-common.cabal +26/−12
- example/Setup.hs +0/−6
- example/example.c +0/−93
- example/example.cabal +0/−25
- example/example.h +0/−14
- example/test.hsc +0/−81
- src/Bindings.hs +0/−257
- src/Bindings/C.hs +14/−0
- src/Bindings/C.hsc +0/−698
- src/Bindings/C/Errno.hsc +10/−0
- src/Bindings/C/Math.hsc +190/−0
- src/Bindings/C/Stddef.hsc +9/−0
- src/Bindings/C/Stdio.hsc +53/−0
- src/Bindings/C/String.hsc +31/−0
- src/Bindings/C/Time.hsc +35/−0
- src/Bindings/Utilities.hs +0/−67
- src/bindings.macros.h +159/−157
.hg_archival.txt view
@@ -1,2 +1,2 @@ repo: db8906263ec6e2f02cd51ed9b583ad96027042e9-node: 5b05498d29352b5839e0ed78eedef32bdaa4e52e+node: fd31e86f9340d433a6b137d5ce01a2ffb054b3da
.hgtags view
@@ -17,9 +17,4 @@ e4b2035d9ac09075748f164694a67bc066c7f5ea libusb-0.0.5 720960ad84b9248da6470fa90908a539c1c439bd posix-0.0.1 c000d3f4d858be75a9714d4cc930458c529876e4 0.2.1-c2c4a362ae898822a6fcbc3096e88a6586d87d2e 0.2.2-dae097e9f947f25b42e3776d67baafbfeb735491 0.2.3-a8e59855e1a64081989a814a52193670e6192a8a 0.2.4-f1ae56619abf50c66674868a9bf5fd5d4c6aeabc 0.2.4-8faa7e11e3f3b025ef86b6921bfeafabf53c4bed 0.2.5-0f04030b62535f50de3b63b5b46b2783c094fa23 0.2.6+0e7d69c9fbfe822197a36ff77d28e15ccb1c8e7e 1.0
bindings-common.cabal view
@@ -2,18 +2,29 @@ name: bindings-common homepage: http://bitbucket.org/mauricio/bindings-common synopsis:- Macros and modules to facilitate writing library bindings.+ Support package for low-level FFI. description: - 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.-version: 0.2.6+ Packages named @bindings-*@ contain low level bindings to well+ known libraries, as a resource to be used by developers of+ higher level modules. This @bindings-common@ package provides+ @hsc2hs@ macros that allows writing code for such low level+ bindings that is easy to read an maintain, while keeping names+ and functionality as close as possible to the base library.+ These macros can be used as a simple alternative to, say,+ @c2hs@, or to @hsc2hs@ original macros. At this moment, there's+ no good documentation on how to use them, so please+ read the code for "Bindings.C" to understand how they work, or+ just fill question\/sugestion reports in the bug tracking web+ site.+ (/Caveat/: fields of a struct declared as arrays are+ not properly supported in this release. Pointer fieds, of course,+ are okay.)+version: 1.0 license: BSD3 license-file: LICENSE maintainer: Maurício C. Antunes <mauricio.antunes@gmail.com> author: Maurício C. Antunes-stability: Needs users feedback+stability: Very close to API stability. build-type: Simple bug-reports: http://bitbucket.org/mauricio/bindings-common/issues category: FFI@@ -24,11 +35,14 @@ bindings.macros.h extensions: ForeignFunctionInterface- ScopedTypeVariables- MultiParamTypeClasses- TypeFamilies build-depends: base >=3 && <5 exposed-modules:- Bindings- Bindings.Utilities Bindings.C+ Bindings.C.Errno+ Bindings.C.Math+ Bindings.C.Stddef+ Bindings.C.Stdio+ Bindings.C.String+ Bindings.C.Time+ cc-options:+ "-D_ISOC99_SOURCE"
− example/Setup.hs
@@ -1,6 +0,0 @@-#!/usr/bin/env runhaskell--module Main (main) where-import Distribution.Simple--main = defaultMain
− example/example.c
@@ -1,93 +0,0 @@-#include "example.h"-#include <stdio.h>--void translate (int what, struct unicode_translator *p)-{- int i;- uint32_t uni;-- switch (what)- {- case UNICODE_2_UTF8:- uni = p->unicode;- for(i=0;i<4;) p->eight_bits[i++] = 0;-- if (uni < 0x7F)- {- p->eight_bits[0] = uni & 0x7F;- p->nchars = 1;- return;- }- else- {- p->eight_bits[0] = uni & 0x3F;- p->eight_bits[0] |= 0x80;- uni >>= 6;- }-- if (uni < 0x20)- {- p->eight_bits[1] = uni & 0x1F;- p->eight_bits[1] |= 0xC0;- p->nchars = 2;- return;- }- else- {- p->eight_bits[1] = uni & 0x3F;- p->eight_bits[1] |= 0x80;- uni >>= 6;- }-- if (uni < 0x10)- {- p->eight_bits[2] = uni & 0xF;- p->eight_bits[2] |= 0xEF;- p->nchars = 3;- return;- }- else- {- p->eight_bits[2] = uni & 0x3F;- p->eight_bits[2] |= 0x80;- uni >>= 6;- }-- p->eight_bits[3] = uni & 0x7;- p->eight_bits[3] |= 0xF0;- p->nchars = 4;- return;-- case UTF8_2_UNICODE:- for(i=p->nchars;i<4;) p->eight_bits[i++] = 0;- if (p->eight_bits[0] < 0x80)- {- p->unicode = p->eight_bits[0];- return;- }- else- p->unicode = p->eight_bits[0] & 0x3F;-- if (p->eight_bits[1] < 0xE0)- {- p->unicode += (p->eight_bits[1] & 0x1F) << 6;- return;- }- else- p->unicode += (p->eight_bits[1] & 0x3F) << 6;-- if (p->eight_bits[2] < 0xF0)- {- p->unicode += (p->eight_bits[2] & 0xF) << 12;- return;- }- else- p->unicode += (p->eight_bits[2] & 0x3F) << 12;-- p->unicode += (p->eight_bits[3] & 0x7) << 18;- return;-- }--}-
− example/example.cabal
@@ -1,25 +0,0 @@-cabal-version: >= 1.2.3-name: example-synopsis:- Example-description: - Example.-version: 0.2.1-license: BSD3-license-file: LICENSE-maintainer: Maurício C. Antunes <mauricio.antunes@gmail.com>-author: Maurício C. Antunes-stability: Needs users feedback-build-type: Simple-category: FFI-executable test- main-is: test.hs- hs-source-dirs: .- include-dirs: .- c-sources: example.c- extensions:- ForeignFunctionInterface- ScopedTypeVariables- MultiParamTypeClasses- TypeFamilies- build-depends: base >=3 && <5, bindings-common
− example/example.h
@@ -1,14 +0,0 @@--#include <stdint.h>--#define UNICODE_2_UTF8 1-#define UTF8_2_UNICODE 2--struct unicode_translator {- uint32_t unicode;- uint8_t eight_bits[4];- int nchars;-};--void translate (int, struct unicode_translator *);-
− example/test.hsc
@@ -1,81 +0,0 @@-#include <bindings.macros.h>-#include "example.h"--#bindings_initialize--module Main (main) where-import Foreign-import Foreign.C-import Data.Int-import Data.List-import Control.Monad-import System.IO.Unsafe--#bindings_num UNICODE_2_UTF8-#bindings_num UTF8_2_UNICODE--#bindings_starttype struct unicode_translator-#bindings_field unicode , Word32-#bindings_array_field eight_bits , Word8 , 4-#bindings_field nchars , CInt-#bindings_stoptype--#bindings_function translate , CInt -> Ptr Unicode_translator -> IO ()--toChar :: (Enum a, Enum b) => a -> b-toChar = toEnum . fromEnum-fromChar :: (Enum a, Num b) => a -> b-fromChar = fromIntegral . fromEnum--unicodeToUtf :: String -> IO String-unicodeToUtf string = liftM concat $ alloca $ \ptrUt ->- (flip mapM) string $ \char -> do- ut <- peek ptrUt- poke ptrUt (ut {unicode_translator'unicode = toChar char})- translate _UNICODE_2_UTF8 ptrUt- ut <- peek ptrUt- let nChars = fromIntegral $ unicode_translator'nchars ut- let eightBits = unicode_translator'eight_bits ut- return $ (map toChar) $ reverse $ take nChars eightBits--utfToUnicode :: String -> IO String-utfToUnicode =- (. (map fromChar)) $- (. splitCodes) $- mapM $ \c -> do- let ut = Unicode_translator {- unicode_translator'nchars = fromIntegral $ length c,- unicode_translator'eight_bits = reverse $ map fromChar c,- unicode_translator'unicode = 0- }- unicode <- with ut $ \ptr -> do- translate _UTF8_2_UNICODE ptr- liftM unicode_translator'unicode $ peek ptr- return $ toChar $ unicode- where- splitCodes :: [Word8] -> [[Word8]]- splitCodes [] = []- splitCodes (a:t) = if (a < 0x80)- then- [a]:(splitCodes t)- else- let i = findIndex (\c -> c < 0x80 || c > 0xBF) t- (t1,t2) = maybe ([],t) (flip splitAt t) i- in (a:t1):(splitCodes t2)--toUtf8 :: String -> String-toUtf8 = unsafePerformIO . unicodeToUtf--fromUtf8 :: String -> String-fromUtf8 = unsafePerformIO . utfToUnicode--printAsInt :: String -> IO ()-printAsInt s = putStrLn $ show $ map fromEnum s--main = do- let a = "Exceção"- printAsInt a- printAsInt $ toUtf8 a- printAsInt $ fromUtf8 $ toUtf8 a--
− src/Bindings.hs
@@ -1,257 +0,0 @@-{-|-- 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 (---- * Code facilities---- | See documentation for module "Bindings.Utilities".---- * How to wrap a library using this package---- | If you want to write a comprehensive binding--- to your favorite library, and you want to try--- this package to see if it suits your needs, you--- can look at this documentation and then at the--- source code for "Bindings.C", which tries to wrap--- the full standard C library.---- * Macros---- | Starting from version 0.2, package @bindings-common@--- provides many @hsc2hs@ macros to easy C binding.--- Here we list the most important.------ [@#bindings_num@] Makes a C value into a Haskell--- name with type @(Num a) => a@. Used mostly to--- copy pre-processor macros. Note that here, as in--- all other macros, Haskell names are automatically--- derived from C names. Usage:------ > #bindings_num MY_MACRO------ [@\#bindings_int@] Like @#bindings_num@, but values--- are typed as @CInt@.------ [@\#bindings_frac@] Like @#bindings_num@, but works--- with floating point numbers. Values will have type--- @(Fractional a) => a@.------ [@#bindings_function@] Wrap C functions. Usage:------ > #bindings_function function_name , CInt -> CString -> IO ()------ [@#bindings_startype , #bindings_stoptype@] Declare a--- Haskell @data@ type after a C type. You can wrap @struct@s,--- @union@s and types named with C @typedef@. Note that--- you can create types with no fields. This may be usefull--- when you don\'t need to reach fields, but your API requires--- you to create values of such types.------ > #bindings_starttype struct my_type--- > #bindings_stoptype _------ You can replace @struct@ with @union@, or remove it--- when your type is defined with @typedef@. Note that--- the @_@ after @#bindings_stoptype@ is needed since--- @hsc2hs@ doesn\'t accept macros with no parameters.------ [@#bindings_field , #bindings_array_field@] Describe fields--- inside types. Supose you have a @struct@ like this:------ > typedef struct my_struct {--- > int index;--- > char *text;--- > char array[10];--- > } my_struct_t;------ You would mimic such type like this.------ > #bindings_starttype my_struct_t--- > #bindings_field index , CInt--- > #bindings_field text , CString--- > #bindings_array_field , array , CChar , 10--- > #bindings_stoptype _------ You get a full instance for @Storable@.------ > v <- peek p :: IO My_struct_t--- > poke p $ v {my_struct_t'index = 1 + (my_struct_t'index v)}------ As you can see from the example above, field names--- are translated to Haskell using @type'field@ pattern.--- This is necessary to avoid name clashes since Haskell--- would not allow many types with similar records, as--- is common practice in C.------ [@#bindings_equivalent_integer@] This gives you a Haskell--- integer type that is the same size as a C type. Usage:------ > type CIntType = #bindings_equivalent_integer int_type------ This is actually equivalent to @hsc2hs@ --- @#type@, except that it is safe to use on pointers--- (but not on floating point types).------ [@#bindings_globalvar@] Wraps a global variable, using--- 'Bindings.Utilities.GlobalVariable'. Usage:------ > #bindings_globalvar external_string , CString------ Note that the internal type of that variable--- will be a pointer to a @CString@, as you\'ll be--- allowed to change its value. When touching it--- using 'Bindings.Utilities.writeGlobalVariable'--- this is invisible to you.---- * Example---- | We\'ll take a small piece of C code and wrap it--- using @hsc2hs@ macros available in @bindings-common@.--- Our intention is to show that we can write Haskell--- code with the help of existing C code, but using--- a Haskell interface that is not built on the C--- interface. This is an alternative to the usual style--- of using adapted versions of native C calls. In our--- opinion, the style shown here is easier to write--- and give results that are more confortable to use--- in Haskell.---- ** C API---- | This is a small (artificial, naive and ugly) API--- for UTF-8 coding of characters. Most APIs have better--- design, but we just want to show how to deal with it.--- In real world, if we wanted, it would obviously be--- easier to write a UTF-8 handler in Haskell than--- this interface.------ > #define UNICODE_2_UTF8 1--- > #define UTF8_2_UNICODE 2------ > struct unicode_translator {--- > uint32_t unicode;--- > uint8_t eight_bits[4];--- > int nchars;--- > };------ > void translate (int, struct unicode_translator *);------ We use it filling @unicode@ field with an unicode--- number, and then calling @translate@ with @UNICODE_2_UTF8@;--- or filling @eight_bits@ and calling @translate@ with--- @UTF8_2_UNICODE@.---- ** Haskell low level binding---- | Now we make use of @hsc2hs@ macros inside Haskell.------ > #bindings_num UNICODE_2_UTF8--- > #bindings_num UTF8_2_UNICODE------ > #bindings_starttype struct unicode_translator--- > #bindings_field unicode , Word32--- > #bindings_array_field eight_bits , Word8 , 4--- > #bindings_field nchars , CInt--- > #bindings_stoptype------ > #bindings_function translate , CInt -> Ptr Unicode_translator -> IO ()------ This gives us a set of declarations as below.------ > _UNICODE_2_UTF8 :: (Num a) => a--- > _UTF8_2_UNICODE :: (Num a) => a--- >--- > data Unicode_translator = Unicode_translator {--- > unicode_translator'unicode :: Word32,--- > unicode_translator'eight_bits :: [Word8],--- > unicode_translator'nchars :: CInt--- > }--- >--- > translate :: CInt -> Ptr Unicode_translator -> IO ()---- ** Cleaner Haskell interface---- | Now we declare a few Haskell utilities that--- better fit Haskell programming.------ > toChar :: (Enum a, Enum b) => a -> b--- > toChar = toEnum . fromEnum--- > fromChar :: (Enum a, Num b) => a -> b--- > fromChar = fromIntegral . fromEnum--- > --- > unicodeToUtf :: String -> IO String--- > unicodeToUtf string = liftM concat $ alloca $ \ptrUt ->--- > (flip mapM) string $ \char -> do--- > ut <- peek ptrUt--- > poke ptrUt (ut {unicode_translator'unicode = toChar char})--- > translate _UNICODE_2_UTF8 ptrUt--- > ut <- peek ptrUt--- > let nChars = fromIntegral $ unicode_translator'nchars ut--- > let eightBits = unicode_translator'eight_bits ut--- > return $ (map toChar) $ reverse $ take nChars eightBits--- > --- > utfToUnicode :: String -> IO String--- > utfToUnicode =--- > (. (map fromChar)) $--- > (. splitCodes) $--- > mapM $ \c -> do--- > let ut = Unicode_translator {--- > unicode_translator'nchars =--- > fromIntegral $ length c,--- > unicode_translator'eight_bits =--- > reverse $ map fromChar c,--- > unicode_translator'unicode = 0--- > }--- > unicode <- with ut $ \ptr -> do--- > translate _UTF8_2_UNICODE ptr--- > liftM unicode_translator'unicode $ peek ptr--- > return $ toChar $ unicode--- > where--- > splitCodes :: [Word8] -> [[Word8]]--- > splitCodes [] = []--- > splitCodes (a:t) = if (a < 0x80)--- > then--- > [a]:(splitCodes t)--- > else--- > let i = findIndex (\c -> c < 0x80 || c > 0xBF) t--- > (t1,t2) = maybe ([],t) (flip splitAt t) i--- > in (a:t1):(splitCodes t2)------ @unicodeToUtf@ and @utfToUnicode@ now use Haskell--- day-to-day types.---- ** Better interface---- | Our functions are effect-free.------ > toUtf8 :: String -> String--- > toUtf8 = unsafePerformIO . unicodeToUtf--- > --- > fromUtf8 :: String -> String--- > fromUtf8 = unsafePerformIO . utfToUnicode------ And this is something we can confortably use.------ > printAsInt :: String -> IO ()--- > printAsInt s = putStrLn $ show $ map fromEnum s--- > --- > main = do--- > let a = "Exceção"--- > printAsInt a--- > printAsInt $ toUtf8 a--- > printAsInt $ fromUtf8 $ toUtf8 a------ Outputs:------ > [69,120,99,101,231,227,111]--- > [69,120,99,101,195,167,195,163,111]--- > [69,120,99,101,231,227,111]-- ) where {}
+ src/Bindings/C.hs view
@@ -0,0 +1,14 @@+module Bindings.C (+ module Bindings.C.Errno,+ module Bindings.C.Math,+ module Bindings.C.Stddef,+ module Bindings.C.Stdio,+ module Bindings.C.String,+ module Bindings.C.Time,+ ) where+import Bindings.C.Errno+import Bindings.C.Math+import Bindings.C.Stddef+import Bindings.C.Stdio+import Bindings.C.String+import Bindings.C.Time
− src/Bindings/C.hsc
@@ -1,698 +0,0 @@-#include <bindings.macros.h>--#bindings_initialize _--module Bindings.C (-- -- * @ctype.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/ctype.h.html>-- #bindings_export_varids isalnum|isalpha|isblank|iscntrl|isdigit- #bindings_export_varids isgraph|islower|isprint|ispunct|isspace- #bindings_export_varids isupper|isxdigit|tolower|toupper-- -- * @errno.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html>-- #bindings_export_varids EDOM|EILSEQ|ERANGE-- -- * @locale.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html>-- #bindings_export_conids lconv-- #bindings_export_varids LC_ALL|LC_COLLATE|LC_CTYPE- #bindings_export_varids LC_MONETARY|LC_NUMERIC|LC_TIME-- #bindings_export_varids localeconv|setlocale-- -- * @math.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/math.h.html>-- #bindings_export_varids acos|acosf|acosl|acosh|acoshf- #bindings_export_varids acoshl|asin|asinf|asinl|asinh- #bindings_export_varids asinhf|asinhl|atan|atanf|atanl- #bindings_export_varids atan2|atan2f|atan2l|atanh|atanhf- #bindings_export_varids atanhl|cbrt|cbrtf|cbrtl|ceil- #bindings_export_varids ceilf|ceill|copysign|copysignf- #bindings_export_varids copysignl|cos|cosf|cosl|cosh- #bindings_export_varids coshf|coshl|erf|erff|erfl|erfc- #bindings_export_varids erfcf|erfcl|exp|expf|expl- #bindings_export_varids exp2|exp2f|exp2l|expm1|expm1f- #bindings_export_varids expm1l|fabs|fabsf|fabsl|fdim- #bindings_export_varids fdimf|fdiml|floor|floorf- #bindings_export_varids floorl|fma|fmaf|fmal|fmax- #bindings_export_varids fmaxf|fmaxl|fmin|fminf|fminl- #bindings_export_varids fmod|fmodf|fmodl|frexp|frexpf- #bindings_export_varids frexpl|hypot|hypotf|hypotl- #bindings_export_varids ilogb|ilogbf|ilogbl|ldexp- #bindings_export_varids ldexpf|ldexpl|lgamma|lgammaf- #bindings_export_varids lgammal|llrint|llrintf|llrintl- #bindings_export_varids llround|llroundf|llroundl|log- #bindings_export_varids logf|logl|log10|log10f|log10l- #bindings_export_varids log1p|log1pf|log1pl|log2- #bindings_export_varids log2f|log2l|logb|logbf|logbl- #bindings_export_varids lrint|lrintf|lrintl|lround- #bindings_export_varids lroundf|lroundl|modf|modff- #bindings_export_varids modfl|nan|nanf|nanl|nearbyint- #bindings_export_varids nearbyintf|nearbyintl|nextafter- #bindings_export_varids nextafterf|nextafterl|nexttoward- #bindings_export_varids nexttowardf|nexttowardl|pow- #bindings_export_varids powf|powl|remainder|remainderf- #bindings_export_varids remainderl|remquo|remquof- #bindings_export_varids remquol|rint|rintf|rintl- #bindings_export_varids round|roundf|roundl|scalbln- #bindings_export_varids scalblnf|scalblnl|scalbn|scalbnf- #bindings_export_varids scalbnl|sin|sinf|sinl|sinh|sinhf- #bindings_export_varids sinhl|sqrt|sqrtf|sqrtl|tan- #bindings_export_varids tanf|tanl|tanh|tanhf|tanhl- #bindings_export_varids tgamma|tgammaf|tgammal|trunc- #bindings_export_varids truncf|truncl-- -- * @signal.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html>-- #bindings_export_varids SIG_DFL|SIG_ERR|SIG_IGN- #bindings_export_varids SIGINT|SIGILL|SIGABRT- #bindings_export_varids SIGFPE|SIGSEGV|SIGTERM-- #bindings_export_varids raise|signal-- -- * @stdbool.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdbool.h.html>-- -- * @stddef.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html>-- #bindings_export_varids NULL-- -- * @stdint.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html>-- -- * @stdio.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html>-- #bindings_export_varids BUFSIZ|_IOFBF|_IOLBF|_IONBF- #bindings_export_varids SEEK_CUR|SEEK_END|SEEK_SET|FILENAME_MAX- #bindings_export_varids FOPEN_MAX|EOF-- #bindings_export_varids clearerr|fclose|feof|ferror- #bindings_export_varids fflush|fgetc|fgetpos|fgets- #bindings_export_varids fopen|fputc|fputs|fread- #bindings_export_varids freopen|fseek|fsetpos|ftell- #bindings_export_varids fwrite|getc|getchar|perror- #bindings_export_varids putc|putchar|puts|remove- #bindings_export_varids rename|rewind|setbuf|setvbuf- #bindings_export_varids tmpfile|ungetc-- -- * @stdlib.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html>-- #bindings_export_varids EXIT_FAILURE|EXIT_SUCCESS|RAND_MAX|MB_CUR_MAX-- #bindings_export_varids _Exit|abort|abs- #bindings_export_varids atof|atoi|atol|atoll- #bindings_export_varids bsearch|calloc|exit|free- #bindings_export_varids getenv|getsubopt|labs|llabs- #bindings_export_varids malloc|mblen|mbstowcs|mbtowc- #bindings_export_varids qsort|rand|realloc|srand- #bindings_export_varids strtod|strtof|strtol|strtold- #bindings_export_varids strtoll|strtoul|strtoull|system- #bindings_export_varids wcstombs|wctomb-- -- * @string.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/string.h.html>-- -- * @time.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html>-- #bindings_export_conids tm-- #bindings_export_varids TIMER_ABSTIME-- #bindings_export_varids clock|difftime|gmtime|localtime- #bindings_export_varids mktime|strftime|time-- -- * @wchar.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/wchar.h.html>-- #bindings_export_conids mbstate_t-- CWint,-- #bindings_export_varids WEOF-- #bindings_export_varids btowc|fgetwc|fgetws|fputwc|fputws- #bindings_export_varids fwide|getwc|getwchar|mbrlen- #bindings_export_varids mbrtowc|mbsinit|mbsrtowcs|putwchar- #bindings_export_varids putwc|ungetwc|wcrtomb|wcscat- #bindings_export_varids wcschr|wcscmp|wcscoll|wcscpy- #bindings_export_varids wcscspn|wcsftime|wcslen|wcsncat- #bindings_export_varids wcsncmp|wcsncpy|wcspbrk|wcsrchr- #bindings_export_varids wcsrtombs|wcsspn|wcsstr|wcstod- #bindings_export_varids wcstof|wcstok|wcstold|wcstoll- #bindings_export_varids wcstol|wcstoull|wcstoul|wcsxfrm- #bindings_export_varids wctob|wmemchr|wmemcmp|wmemcpy- #bindings_export_varids wmemmove|wmemset-- -- * @wctype.h@-- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/wctype.h.html>-- CWctrans,CWctype,-- #bindings_export_varids iswalnum|iswalpha|iswblank| \- iswcntrl|iswctype|iswdigit|iswgraph|iswlower| \- iswprint|iswpunct|iswspace|iswupper|iswxdigit| \- towctrans|towlower|towupper|wctrans|wctype----- ) where--import Prelude (($),Monad(..),IO(..),Num)-import Foreign hiding (free,malloc,realloc)-import Foreign.C--#include <ctype.h>--#bindings_function isalnum , CInt -> IO CInt-#bindings_function isalpha , CInt -> IO CInt-#bindings_function isblank , CInt -> IO CInt-#bindings_function iscntrl , CInt -> IO CInt-#bindings_function isdigit , CInt -> IO CInt-#bindings_function isgraph , CInt -> IO CInt-#bindings_function islower , CInt -> IO CInt-#bindings_function isprint , CInt -> IO CInt-#bindings_function ispunct , CInt -> IO CInt-#bindings_function isspace , CInt -> IO CInt-#bindings_function isupper , CInt -> IO CInt-#bindings_function isxdigit , CInt -> IO CInt-#bindings_function tolower , CInt -> IO CInt-#bindings_function toupper , CInt -> IO CInt--#include <errno.h>--#bindings_int EDOM-#bindings_int EILSEQ-#bindings_int ERANGE--#include <locale.h>--#bindings_function localeconv , IO (Ptr Lconv)-#bindings_function setlocale , CInt -> CString -> IO CString--#bindings_starttype struct lconv-#bindings_field currency_symbol , CString-#bindings_field decimal_point , CString-#bindings_field frac_digits , CChar-#bindings_field grouping , CString-#bindings_field int_curr_symbol , CString-#bindings_field int_frac_digits , CChar--- #bindings_field int_n_cs_precedes , CChar--- #bindings_field int_n_sep_by_space , CChar--- #bindings_field int_n_sign_posn , CChar--- #bindings_field int_p_cs_precedes , CChar--- #bindings_field int_p_sep_by_space , CChar--- #bindings_field int_p_sign_posn , CChar-#bindings_field mon_decimal_point , CString-#bindings_field mon_grouping , CString-#bindings_field mon_thousands_sep , CString-#bindings_field negative_sign , CString-#bindings_field n_cs_precedes , CChar-#bindings_field n_sep_by_space , CChar-#bindings_field n_sign_posn , CChar-#bindings_field positive_sign , CString-#bindings_field p_cs_precedes , CChar-#bindings_field p_sep_by_space , CChar-#bindings_field p_sign_posn , CChar-#bindings_field thousands_sep , CString-#bindings_stoptype _--#bindings_int LC_ALL-#bindings_int LC_COLLATE-#bindings_int LC_CTYPE-#bindings_int LC_MONETARY-#bindings_int LC_NUMERIC-#bindings_int LC_TIME--#include <math.h>---- #bindings_double HUGE_VAL--#bindings_function acos , CDouble -> IO CDouble-#bindings_function acosf , CFloat -> IO CFloat-#bindings_function acosl , CLDouble -> IO CLDouble-#bindings_function acosh , CDouble -> IO CDouble-#bindings_function acoshf , CFloat -> IO CFloat-#bindings_function acoshl , CLDouble -> IO CLDouble-#bindings_function asin , CDouble -> IO CDouble-#bindings_function asinf , CFloat -> IO CFloat-#bindings_function asinl , CLDouble -> IO CLDouble-#bindings_function asinh , CDouble -> IO CDouble-#bindings_function asinhf , CFloat -> IO CFloat-#bindings_function asinhl , CLDouble -> IO CLDouble-#bindings_function atan , CDouble -> IO CDouble-#bindings_function atanf , CFloat -> IO CFloat-#bindings_function atanl , CLDouble -> IO CLDouble-#bindings_function atan2 , CDouble -> CDouble -> IO CDouble-#bindings_function atan2f , CFloat -> CFloat -> IO CFloat-#bindings_function atan2l , CLDouble -> CLDouble -> IO CLDouble-#bindings_function atanh , CDouble -> IO CDouble-#bindings_function atanhf , CFloat -> IO CFloat-#bindings_function atanhl , CLDouble -> IO CLDouble-#bindings_function cbrt , CDouble -> IO CDouble-#bindings_function cbrtf , CFloat -> IO CFloat-#bindings_function cbrtl , CLDouble -> IO CLDouble-#bindings_function ceil , CDouble -> IO CDouble-#bindings_function ceilf , CFloat -> IO CFloat-#bindings_function ceill , CLDouble -> IO CLDouble-#bindings_function copysign , CDouble -> CDouble -> IO CDouble-#bindings_function copysignf , CFloat -> CFloat -> IO CFloat-#bindings_function copysignl , CLDouble -> CLDouble -> IO CLDouble-#bindings_function cos , CDouble -> IO CDouble-#bindings_function cosf , CFloat -> IO CFloat-#bindings_function cosl , CLDouble -> IO CLDouble-#bindings_function cosh , CDouble -> IO CDouble-#bindings_function coshf , CFloat -> IO CFloat-#bindings_function coshl , CLDouble -> IO CLDouble-#bindings_function erf , CDouble -> IO CDouble-#bindings_function erff , CFloat -> IO CFloat-#bindings_function erfl , CLDouble -> IO CLDouble-#bindings_function erfc , CDouble -> IO CDouble-#bindings_function erfcf , CFloat -> IO CFloat-#bindings_function erfcl , CLDouble -> IO CLDouble-#bindings_function exp , CDouble -> IO CDouble-#bindings_function expf , CFloat -> IO CFloat-#bindings_function expl , CLDouble -> IO CLDouble-#bindings_function exp2 , CDouble -> IO CDouble-#bindings_function exp2f , CFloat -> IO CFloat-#bindings_function exp2l , CLDouble -> IO CLDouble-#bindings_function expm1 , CDouble -> IO CDouble-#bindings_function expm1f , CFloat -> IO CFloat-#bindings_function expm1l , CLDouble -> IO CLDouble-#bindings_function fabs , CDouble -> IO CDouble-#bindings_function fabsf , CFloat -> IO CFloat-#bindings_function fabsl , CLDouble -> IO CLDouble-#bindings_function fdim , CDouble -> CDouble -> IO CDouble-#bindings_function fdimf , CFloat -> CFloat -> IO CFloat-#bindings_function fdiml , CLDouble -> CLDouble -> IO CLDouble-#bindings_function floor , CDouble -> IO CDouble-#bindings_function floorf , CFloat -> IO CFloat-#bindings_function floorl , CLDouble -> IO CLDouble-#bindings_function fma , CDouble -> CDouble -> CDouble -> IO CDouble-#bindings_function fmaf , CFloat -> CFloat -> CFloat -> IO CFloat-#bindings_function fmal , CLDouble -> CLDouble -> CLDouble -> IO CLDouble-#bindings_function fmax , CDouble -> CDouble -> IO CDouble-#bindings_function fmaxf , CFloat -> CFloat -> IO CFloat-#bindings_function fmaxl , CLDouble -> CLDouble -> IO CLDouble-#bindings_function fmin , CDouble -> CDouble -> IO CDouble-#bindings_function fminf , CFloat -> CFloat -> IO CFloat-#bindings_function fminl , CLDouble -> CLDouble -> IO CLDouble-#bindings_function fmod , CDouble -> CDouble -> IO CDouble-#bindings_function fmodf , CFloat -> CFloat -> IO CFloat-#bindings_function fmodl , CLDouble -> CLDouble -> IO CLDouble-#bindings_function frexp , CDouble -> Ptr CInt -> IO CDouble-#bindings_function frexpf , CFloat -> Ptr CInt -> IO CFloat-#bindings_function frexpl , CLDouble -> Ptr CInt -> IO CLDouble-#bindings_function hypot , CDouble -> CDouble -> IO CDouble-#bindings_function hypotf , CFloat -> CFloat -> IO CFloat-#bindings_function hypotl , CLDouble -> CLDouble -> IO CLDouble-#bindings_function ilogb , CDouble -> IO CDouble-#bindings_function ilogbf , CFloat -> IO CFloat-#bindings_function ilogbl , CLDouble -> IO CLDouble-#bindings_function ldexp , CDouble -> CInt -> IO CDouble-#bindings_function ldexpf , CFloat -> CInt -> IO CFloat-#bindings_function ldexpl , CLDouble -> CInt -> IO CLDouble-#bindings_function lgamma , CDouble -> IO CDouble-#bindings_function lgammaf , CFloat -> IO CFloat-#bindings_function lgammal , CLDouble -> IO CLDouble-#bindings_function llrint , CDouble -> IO CLLong-#bindings_function llrintf , CFloat -> IO CLLong-#bindings_function llrintl , CLDouble -> IO CLLong-#bindings_function llround , CDouble -> IO CLLong-#bindings_function llroundf , CFloat -> IO CLLong-#bindings_function llroundl , CLDouble -> IO CLLong-#bindings_function log , CDouble -> IO CDouble-#bindings_function logf , CFloat -> IO CFloat-#bindings_function logl , CLDouble -> IO CLDouble-#bindings_function log10 , CDouble -> IO CDouble-#bindings_function log10f , CFloat -> IO CFloat-#bindings_function log10l , CLDouble -> IO CLDouble-#bindings_function log1p , CDouble -> IO CDouble-#bindings_function log1pf , CFloat -> IO CFloat-#bindings_function log1pl , CLDouble -> IO CLDouble-#bindings_function log2 , CDouble -> IO CDouble-#bindings_function log2f , CFloat -> IO CFloat-#bindings_function log2l , CLDouble -> IO CLDouble-#bindings_function logb , CDouble -> IO CDouble-#bindings_function logbf , CFloat -> IO CFloat-#bindings_function logbl , CLDouble -> IO CLDouble-#bindings_function lrint , CDouble -> IO CLong-#bindings_function lrintf , CFloat -> IO CLong-#bindings_function lrintl , CLDouble -> IO CLong-#bindings_function lround , CDouble -> IO CLong-#bindings_function lroundf , CFloat -> IO CLong-#bindings_function lroundl , CLDouble -> IO CLong-#bindings_function modf , CDouble -> Ptr CDouble -> IO CDouble-#bindings_function modff , CFloat -> Ptr CFloat -> IO CFloat-#bindings_function modfl , CLDouble -> Ptr CLDouble -> IO CLDouble-#bindings_function nan , CString -> IO CDouble-#bindings_function nanf , CString -> IO CFloat-#bindings_function nanl , CString -> IO CLDouble-#bindings_function nearbyint , CDouble -> IO CDouble-#bindings_function nearbyintf , CFloat -> IO CFloat-#bindings_function nearbyintl , CLDouble -> IO CLDouble-#bindings_function nextafter , CDouble -> CDouble -> IO CDouble-#bindings_function nextafterf , CFloat -> CFloat -> IO CFloat-#bindings_function nextafterl , CLDouble -> CLDouble -> IO CLDouble-#bindings_function nexttoward , CDouble -> CLDouble -> IO CDouble-#bindings_function nexttowardf , CFloat -> CLDouble -> IO CFloat-#bindings_function nexttowardl , CLDouble -> CLDouble -> IO CLDouble-#bindings_function pow , CDouble -> CDouble -> IO CDouble-#bindings_function powf , CFloat -> CFloat -> IO CFloat-#bindings_function powl , CLDouble -> CLDouble -> IO CLDouble-#bindings_function remainder , CDouble -> CDouble -> IO CDouble-#bindings_function remainderf , CFloat -> CFloat -> IO CFloat-#bindings_function remainderl , CLDouble -> CLDouble -> IO CLDouble-#bindings_function remquo , CDouble -> CDouble -> Ptr CInt -> CDouble-#bindings_function remquof , CFloat -> CFloat -> Ptr CInt -> CFloat-#bindings_function remquol , CLDouble -> CLDouble -> Ptr CInt -> CLDouble-#bindings_function rint , CDouble -> IO CDouble-#bindings_function rintf , CFloat -> IO CFloat-#bindings_function rintl , CLDouble -> IO CLDouble-#bindings_function round , CDouble -> IO CDouble-#bindings_function roundf , CFloat -> IO CFloat-#bindings_function roundl , CLDouble -> IO CLDouble-#bindings_function scalbln , CDouble -> CLong -> IO CDouble-#bindings_function scalblnf , CFloat -> CLong -> IO CFloat-#bindings_function scalblnl , CLDouble -> CLong -> IO CLDouble-#bindings_function scalbn , CDouble -> CInt -> IO CDouble-#bindings_function scalbnf , CFloat -> CInt -> IO CFloat-#bindings_function scalbnl , CLDouble -> CInt -> IO CLDouble-#bindings_function sin , CDouble -> IO CDouble-#bindings_function sinf , CFloat -> IO CFloat-#bindings_function sinl , CLDouble -> IO CLDouble-#bindings_function sinh , CDouble -> IO CDouble-#bindings_function sinhf , CFloat -> IO CFloat-#bindings_function sinhl , CLDouble -> IO CLDouble-#bindings_function sqrt , CDouble -> IO CDouble-#bindings_function sqrtf , CFloat -> IO CFloat-#bindings_function sqrtl , CLDouble -> IO CLDouble-#bindings_function tan , CDouble -> IO CDouble-#bindings_function tanf , CFloat -> IO CFloat-#bindings_function tanl , CLDouble -> IO CLDouble-#bindings_function tanh , CDouble -> IO CDouble-#bindings_function tanhf , CFloat -> IO CFloat-#bindings_function tanhl , CLDouble -> IO CLDouble-#bindings_function tgamma , CDouble -> IO CDouble-#bindings_function tgammaf , CFloat -> IO CFloat-#bindings_function tgammal , CLDouble -> IO CLDouble-#bindings_function trunc , CDouble -> IO CDouble-#bindings_function truncf , CFloat -> IO CFloat-#bindings_function truncl , CLDouble -> IO CLDouble--#include <signal.h>--#bindings_funptr SIG_DFL , FunPtr (CInt -> IO ())-#bindings_funptr SIG_ERR , FunPtr (CInt -> IO ())-#bindings_funptr SIG_IGN , FunPtr (CInt -> IO ())--#bindings_int SIGINT-#bindings_int SIGILL-#bindings_int SIGABRT-#bindings_int SIGFPE-#bindings_int SIGSEGV-#bindings_int SIGTERM--#bindings_function raise , CInt -> IO CInt-#bindings_function signal , CInt -> IO (FunPtr (CInt -> (CInt -> IO ())))--#include <stddef.h>--#bindings_ptr NULL , Ptr a--#include <stdio.h>--#bindings_num BUFSIZ-#bindings_num _IOFBF-#bindings_num _IOLBF-#bindings_num _IONBF-#bindings_num SEEK_CUR-#bindings_num SEEK_END-#bindings_num SEEK_SET-#bindings_num FILENAME_MAX-#bindings_num FOPEN_MAX-#bindings_int EOF--- #bindings_ptr stderr , Ptr CFile--- #bindings_ptr stdin , Ptr CFile--- #bindings_ptr stdout , Ptr CFile--#bindings_function clearerr , Ptr CFile -> IO ()-#bindings_function fclose , Ptr CFile -> IO CInt-#bindings_function feof , Ptr CFile -> IO CInt-#bindings_function ferror , Ptr CFile -> IO CInt-#bindings_function fflush , Ptr CFile -> IO CInt-#bindings_function fgetc , Ptr CFile -> IO CInt-#bindings_function fgetpos , Ptr CFile -> Ptr CFpos -> IO CInt-#bindings_function fgets , CString -> CInt -> Ptr CFile -> IO CString-#bindings_function fopen , CString -> CString -> IO (Ptr CFile)-#bindings_function fputc , CInt -> Ptr CFile -> IO CInt-#bindings_function fputs , CString -> Ptr CFile -> IO CInt-#bindings_function fread , Ptr () -> CSize -> CSize -> \- Ptr CFile -> IO CSize-#bindings_function freopen , CString -> CString -> \- Ptr CFile -> IO (Ptr CFile)-#bindings_function fseek , Ptr CFile -> CLong -> CInt -> IO CInt-#bindings_function fsetpos , Ptr CFile -> Ptr CFpos -> IO CInt-#bindings_function ftell , Ptr CFile -> IO CLong-#bindings_function fwrite , Ptr () -> CSize -> CSize -> \- Ptr CFile -> IO CSize-#bindings_function getc , Ptr CFile -> IO CInt-#bindings_function getchar , IO CInt-#bindings_function perror , CString -> IO ()-#bindings_function putc , CInt -> Ptr CFile -> IO CInt-#bindings_function putchar , CInt -> IO CInt-#bindings_function puts , CString -> IO CInt-#bindings_function remove , CString -> IO CInt-#bindings_function rename , CString -> CString -> IO CInt-#bindings_function rewind , Ptr CFile -> IO ()-#bindings_function setbuf , Ptr CFile -> CString -> IO ()-#bindings_function setvbuf , Ptr CFile -> CString -> \- CInt -> CSize -> IO CInt-#bindings_function tmpfile , IO (Ptr CFile)-#bindings_function ungetc , CInt -> Ptr CFile -> IO CInt--#include <stdlib.h>--#bindings_num EXIT_FAILURE-#bindings_num EXIT_SUCCESS-#bindings_num RAND_MAX-#bindings_size MB_CUR_MAX--#bindings_function _Exit , CInt -> IO ()-#bindings_function abort , IO ()-#bindings_function abs , CInt -> IO CInt-#bindings_function atof , CString -> IO CDouble-#bindings_function atoi , CString -> IO CInt-#bindings_function atol , CString -> IO CLong-#bindings_function atoll , CString -> IO CLLong-#bindings_function bsearch , Ptr a -> Ptr a -> CSize -> CSize -> \- FunPtr (Ptr a -> Ptr a -> IO CInt) -> IO (Ptr a)-#bindings_function calloc , CSize -> CSize -> IO (Ptr ())-#bindings_function exit , CInt -> IO ()-#bindings_function free , Ptr () -> IO ()-#bindings_function getenv , CString -> IO CString-#bindings_function getsubopt , Ptr CString -> Ptr CString -> \- Ptr CString -> IO CInt-#bindings_function labs , CLong -> IO CLong-#bindings_function llabs , CLLong -> IO CLLong-#bindings_function malloc , CSize -> IO (Ptr ())-#bindings_function mblen , CString -> CSize -> IO CInt-#bindings_function mbstowcs , Ptr CWchar -> CString -> \- CSize -> IO CSize-#bindings_function mbtowc , Ptr CWchar -> CString -> \- CSize -> IO CInt-#bindings_function qsort , Ptr a -> CSize -> CSize -> \- FunPtr (Ptr a -> Ptr a -> IO CInt) -> IO ()-#bindings_function rand , IO CInt-#bindings_function realloc , Ptr () -> CSize -> IO (Ptr ())-#bindings_function srand , CUInt -> IO ()-#bindings_function strtod , CString -> Ptr CString -> IO CDouble-#bindings_function strtof , CString -> Ptr CString -> IO CFloat-#bindings_function strtol , CString -> Ptr CString -> \- CInt -> IO CLong-#bindings_function strtold , CString -> Ptr CString -> \- IO CLDouble-#bindings_function strtoll , CString -> Ptr CString -> \- CInt -> IO CLLong-#bindings_function strtoul , CString -> Ptr CString -> \- CInt -> Ptr CULong-#bindings_function strtoull , CString -> Ptr CString -> \- CInt -> IO CULLong-#bindings_function system , CString -> IO CInt-#bindings_function wcstombs , CString -> Ptr CWchar -> \- CSize -> IO CSize-#bindings_function wctomb , CString -> CWchar -> IO CInt--#include <time.h>--#bindings_starttype struct tm-#bindings_field tm_sec , CInt-#bindings_field tm_min , CInt-#bindings_field tm_hour , CInt-#bindings_field tm_mday , CInt-#bindings_field tm_mon , CInt-#bindings_field tm_year , CInt-#bindings_field tm_wday , CInt-#bindings_field tm_yday , CInt-#bindings_field tm_isdst , CInt-#bindings_stoptype _--#bindings_function clock , IO CClock-#bindings_function difftime , CTime -> CTime -> IO CDouble-#bindings_function gmtime , Ptr CTime -> IO (Ptr Tm)-#bindings_function localtime , Ptr CTime -> IO (Ptr Tm)-#bindings_function mktime , Ptr Tm -> IO CTime-#bindings_function strftime , CString -> CSize -> CString -> \- Ptr Tm -> IO CSize-#bindings_function time , Ptr CTime -> IO CTime---- #bindings_clock CLOCKS_PER_SEC-#bindings_num TIMER_ABSTIME--#include <wchar.h>--#bindings_starttype mbstate_t-#bindings_stoptype _--type CWint = #bindings_equivalent_integer wint_t--#bindings_integer_like WEOF , CWint--#bindings_function btowc , CInt -> IO CWint-#bindings_function fgetwc , Ptr CFile -> IO CWint-#bindings_function fgetws , Ptr CWchar -> CInt -> \- Ptr CFile -> IO (Ptr CWchar)-#bindings_function fputwc , CWchar -> Ptr CFile -> \- IO CWint-#bindings_function fputws , Ptr CWchar -> Ptr CFile -> \- IO CInt-#bindings_function fwide , Ptr CFile -> CInt -> \- IO CInt-#bindings_function getwc , Ptr CFile -> IO CWint-#bindings_function getwchar , IO CWint-#bindings_function mbrlen , CString -> CSize -> \- Ptr Mbstate_t -> IO CSize-#bindings_function mbrtowc , Ptr CWchar -> CString -> \- CSize -> Ptr Mbstate_t -> IO CSize-#bindings_function mbsinit , Ptr Mbstate_t -> IO CInt-#bindings_function mbsrtowcs , Ptr CWchar -> Ptr CString -> \- CSize -> Ptr Mbstate_t -> IO CSize-#bindings_function putwchar , CWchar -> IO CWint-#bindings_function putwc , CWchar -> Ptr CFile -> \- IO CWint-#bindings_function ungetwc , CWint -> Ptr CFile -> \- IO CWint-#bindings_function wcrtomb , CString -> CWchar -> \- Ptr Mbstate_t -> IO CSize-#bindings_function wcscat , Ptr CWchar -> Ptr CWchar -> \- IO CWchar-#bindings_function wcschr , Ptr CWchar -> CWchar -> \- IO CWchar-#bindings_function wcscmp , Ptr CWchar -> Ptr CWchar -> \- IO CInt-#bindings_function wcscoll , Ptr CWchar -> Ptr CWchar -> \- IO CInt-#bindings_function wcscpy , Ptr CWchar -> Ptr CWchar -> \- IO (Ptr CWchar)-#bindings_function wcscspn , Ptr CWchar -> Ptr CWchar -> \- IO CSize-#bindings_function wcsftime , Ptr CWchar -> CSize -> \- Ptr CWchar -> Ptr Tm -> IO CSize-#bindings_function wcslen , Ptr CWchar -> IO CSize-#bindings_function wcsncat , Ptr CWchar -> Ptr CWchar -> \- CSize -> IO (Ptr CWchar)-#bindings_function wcsncmp , Ptr CWchar -> Ptr CWchar -> \- CSize -> IO CInt-#bindings_function wcsncpy , Ptr CWchar -> Ptr CWchar -> \- CSize -> IO (Ptr CWchar)-#bindings_function wcspbrk , Ptr CWchar -> Ptr CWchar -> \- IO (Ptr CWchar)-#bindings_function wcsrchr , Ptr CWchar -> CWchar -> \- IO (Ptr CWchar)-#bindings_function wcsrtombs , CString -> Ptr (Ptr CWchar) -> \- CSize -> Ptr Mbstate_t -> IO CSize-#bindings_function wcsspn , Ptr CWchar -> Ptr CWchar -> \- IO CSize-#bindings_function wcsstr , Ptr CWchar -> Ptr CWchar -> \- IO (Ptr CWchar)-#bindings_function wcstod , Ptr CWchar -> Ptr (Ptr CWchar) -> \- IO CDouble-#bindings_function wcstof , Ptr CWchar -> Ptr (Ptr CWchar) -> \- IO CFloat-#bindings_function wcstok , Ptr CWchar -> Ptr CWchar -> \- Ptr (Ptr CWchar) -> IO (Ptr CWchar)-#bindings_function wcstold , Ptr CWchar -> Ptr (Ptr CWchar) -> \- IO CLDouble-#bindings_function wcstoll , Ptr CWchar -> Ptr (Ptr CWchar) -> \- CInt -> IO CLLong-#bindings_function wcstol , Ptr CWchar -> Ptr (Ptr CWchar) -> \- CInt -> CLong-#bindings_function wcstoull , Ptr CWchar -> Ptr (Ptr CWchar) -> \- CInt -> IO CULLong-#bindings_function wcstoul , Ptr CWchar -> Ptr (Ptr CWchar) -> \- CInt -> IO CULong-#bindings_function wcsxfrm , Ptr CWchar -> Ptr CWchar -> \- CSize -> IO CSize-#bindings_function wctob , CWint -> IO CInt-#bindings_function wmemchr , Ptr CWchar -> CWchar -> \- CSize -> IO (Ptr CWchar)-#bindings_function wmemcmp , Ptr CWchar -> Ptr CWchar -> \- CSize -> IO CInt-#bindings_function wmemcpy , Ptr CWchar -> Ptr CWchar -> \- CSize -> IO (Ptr CWchar)-#bindings_function wmemmove , Ptr CWchar -> Ptr CWchar -> \- CSize -> IO (Ptr CWchar)-#bindings_function wmemset , Ptr CWchar -> CWchar -> \- CSize -> IO (Ptr CWchar)--#include <wctype.h>--type CWctrans = #bindings_equivalent_integer wctrans_t-type CWctype = #bindings_equivalent_integer wctype_t--#bindings_function iswalnum , CWint -> IO CInt-#bindings_function iswalpha , CWint -> IO CInt-#bindings_function iswblank , CWint -> IO CInt-#bindings_function iswcntrl , CWint -> IO CInt-#bindings_function iswctype , CWint -> CWctype -> IO CInt-#bindings_function iswdigit , CWint -> IO CInt-#bindings_function iswgraph , CWint -> IO CInt-#bindings_function iswlower , CWint -> IO CInt-#bindings_function iswprint , CWint -> IO CInt-#bindings_function iswpunct , CWint -> IO CInt-#bindings_function iswspace , CWint -> IO CInt-#bindings_function iswupper , CWint -> IO CInt-#bindings_function iswxdigit , CWint -> IO CInt-#bindings_function towctrans , CWint -> CWctrans -> IO CWint-#bindings_function towlower , CWint -> IO CWint-#bindings_function towupper , CWint -> IO CWint-#bindings_function wctrans , CString -> IO CWctrans-#bindings_function wctype , CString -> IO CWctype--
+ src/Bindings/C/Errno.hsc view
@@ -0,0 +1,10 @@+#include <bindings.macros.h>+#include <errno.h>++-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html>++module Bindings.C.Errno where++#num EDOM+#num EILSEQ+#num ERANGE
+ src/Bindings/C/Math.hsc view
@@ -0,0 +1,190 @@+#include <bindings.macros.h>+#include <math.h>++-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/math.h.html>++module Bindings.C.Math where+import Foreign+import Foreign.C++#num FP_INFINITE+#num FP_NAN+#num FP_NORMAL+#num FP_SUBNORMAL+#num FP_ZERO+#num FP_ILOGB0+#num FP_ILOGBNAN+#num MATH_ERRNO+#num MATH_ERREXCEPT++#ccall acos , CDouble -> IO CDouble+#ccall acosf , CFloat -> IO CFloat +#ccall acosh , CDouble -> IO CDouble +#ccall acoshf , CFloat -> IO CFloat +#ccall acoshl , CLDouble -> IO CLDouble+#ccall acosl , CLDouble -> IO CLDouble+#ccall asin , CDouble -> IO CDouble +#ccall asinf , CFloat -> IO CFloat +#ccall asinh , CDouble -> IO CDouble +#ccall asinhf , CFloat -> IO CFloat +#ccall asinhl , CLDouble -> IO CLDouble+#ccall asinl , CLDouble -> IO CLDouble+#ccall atan , CDouble -> IO CDouble +#ccall atan2 , CDouble -> CDouble -> IO CDouble +#ccall atan2f , CFloat -> CFloat -> IO CFloat +#ccall atan2l , CLDouble -> CLDouble -> IO CLDouble+#ccall atanf , CFloat -> IO CFloat +#ccall atanh , CDouble -> IO CDouble +#ccall atanhf , CFloat -> IO CFloat +#ccall atanhl , CLDouble -> IO CLDouble+#ccall atanl , CLDouble -> IO CLDouble+#ccall cbrt , CDouble -> IO CDouble +#ccall cbrtf , CFloat -> IO CFloat +#ccall cbrtl , CLDouble -> IO CLDouble+#ccall ceil , CDouble -> IO CDouble +#ccall ceilf , CFloat -> IO CFloat +#ccall ceill , CLDouble -> IO CLDouble+#ccall copysign , CDouble -> CDouble -> IO CDouble +#ccall copysignf , CFloat -> CFloat -> IO CFloat +#ccall copysignl , CLDouble -> CLDouble -> IO CLDouble+#ccall cos , CDouble -> IO CDouble +#ccall cosf , CFloat -> IO CFloat +#ccall cosh , CDouble -> IO CDouble +#ccall coshf , CFloat -> IO CFloat +#ccall coshl , CLDouble -> IO CLDouble+#ccall cosl , CLDouble -> IO CLDouble+#ccall erf , CDouble -> IO CDouble +#ccall erfc , CDouble -> IO CDouble +#ccall erfcf , CFloat -> IO CFloat +#ccall erfcl , CLDouble -> IO CLDouble+#ccall erff , CFloat -> IO CFloat +#ccall erfl , CLDouble -> IO CLDouble+#ccall exp , CDouble -> IO CDouble +#ccall exp2 , CDouble -> IO CDouble +#ccall exp2f , CFloat -> IO CFloat +#ccall exp2l , CLDouble -> IO CLDouble+#ccall expf , CFloat -> IO CFloat +#ccall expl , CLDouble -> IO CLDouble+#ccall expm1 , CDouble -> IO CDouble +#ccall expm1f , CFloat -> IO CFloat +#ccall expm1l , CLDouble -> IO CLDouble+#ccall fabs , CDouble -> IO CDouble +#ccall fabsf , CFloat -> IO CFloat +#ccall fabsl , CLDouble -> IO CLDouble+#ccall fdim , CDouble -> CDouble -> IO CDouble +#ccall fdimf , CFloat -> CFloat -> IO CFloat +#ccall fdiml , CLDouble -> CLDouble -> IO CLDouble+#ccall floor , CDouble -> IO CDouble +#ccall floorf , CFloat -> IO CFloat +#ccall floorl , CLDouble -> IO CLDouble+#ccall fma , CDouble -> CDouble -> CDouble -> IO CDouble +#ccall fmaf , CFloat -> CFloat -> CFloat -> IO CFloat +#ccall fmal , CLDouble -> CLDouble -> CLDouble -> IO CLDouble+#ccall fmax , CDouble -> CDouble -> IO CDouble +#ccall fmaxf , CFloat -> CFloat -> IO CFloat +#ccall fmaxl , CLDouble -> CLDouble -> IO CLDouble+#ccall fmin , CDouble -> CDouble -> IO CDouble +#ccall fminf , CFloat -> CFloat -> IO CFloat +#ccall fminl , CLDouble -> CLDouble -> IO CLDouble+#ccall fmod , CDouble -> CDouble -> IO CDouble +#ccall fmodf , CFloat -> CFloat -> IO CFloat +#ccall fmodl , CLDouble -> CLDouble -> IO CLDouble+#ccall frexp , CDouble -> Ptr CInt -> IO CDouble +#ccall frexpf , CFloat -> Ptr CInt -> IO CFloat +#ccall frexpl , CLDouble -> Ptr CInt -> IO CLDouble+#ccall hypot , CDouble -> CDouble -> IO CDouble +#ccall hypotf , CFloat -> CFloat -> IO CFloat +#ccall hypotl , CLDouble -> CLDouble -> IO CLDouble+#ccall ilogb , CDouble -> IO CInt +#ccall ilogbf , CFloat -> IO CInt +#ccall ilogbl , CLDouble -> IO CInt +#ccall ldexp , CDouble -> CInt -> IO CDouble +#ccall ldexpf , CFloat -> CInt -> IO CFloat +#ccall ldexpl , CLDouble -> CInt -> IO CLDouble+#ccall lgamma , CDouble -> IO CDouble +#ccall lgammaf , CFloat -> IO CFloat +#ccall lgammal , CLDouble -> IO CLDouble+#ccall llrint , CDouble -> IO CLLong +#ccall llrintf , CFloat -> IO CLLong +#ccall llrintl , CLDouble -> IO CLLong +#ccall llround , CDouble -> IO CLLong +#ccall llroundf , CFloat -> IO CLLong +#ccall llroundl , CLDouble -> IO CLLong +#ccall log , CDouble -> IO CDouble +#ccall log10 , CDouble -> IO CDouble +#ccall log10f , CFloat -> IO CFloat +#ccall log10l , CLDouble -> IO CLDouble+#ccall log1p , CDouble -> IO CDouble +#ccall log1pf , CFloat -> IO CFloat +#ccall log1pl , CLDouble -> IO CLDouble+#ccall log2 , CDouble -> IO CDouble +#ccall log2f , CFloat -> IO CFloat +#ccall log2l , CLDouble -> IO CLDouble+#ccall logb , CDouble -> IO CDouble +#ccall logbf , CFloat -> IO CFloat +#ccall logbl , CLDouble -> IO CLDouble+#ccall logf , CFloat -> IO CFloat +#ccall logl , CLDouble -> IO CLDouble+#ccall lrint , CDouble -> IO CLong +#ccall lrintf , CFloat -> IO CLong +#ccall lrintl , CLDouble -> IO CLong +#ccall lround , CDouble -> IO CLong +#ccall lroundf , CFloat -> IO CLong +#ccall lroundl , CLDouble -> IO CLong +#ccall modf , CDouble -> Ptr CDouble -> IO CDouble +#ccall modff , CFloat -> Ptr CFloat -> IO CFloat +#ccall modfl , CLDouble -> Ptr CLDouble -> IO CLDouble+#ccall nan , CString -> IO CDouble +#ccall nanf , CString -> IO CFloat +#ccall nanl , CString -> IO CLDouble+#ccall nearbyint , CDouble -> IO CDouble +#ccall nearbyintf , CFloat -> IO CFloat +#ccall nearbyintl , CLDouble -> IO CLDouble+#ccall nextafter , CDouble -> CDouble -> IO CDouble +#ccall nextafterf , CFloat -> CFloat -> IO CFloat +#ccall nextafterl , CLDouble -> CLDouble -> IO CLDouble+#ccall nexttoward , CDouble -> CLDouble -> IO CDouble +#ccall nexttowardf , CFloat -> CLDouble -> IO CFloat +#ccall nexttowardl , CLDouble -> CLDouble -> IO CLDouble+#ccall pow , CDouble -> CDouble -> IO CDouble +#ccall powf , CFloat -> CFloat -> IO CFloat +#ccall powl , CLDouble -> CLDouble -> IO CLDouble+#ccall remainder , CDouble -> CDouble -> IO CDouble +#ccall remainderf , CFloat -> CFloat -> IO CFloat +#ccall remainderl , CLDouble -> CLDouble -> IO CLDouble+#ccall remquo , CDouble -> CDouble -> Ptr CInt -> IO CDouble +#ccall remquof , CFloat -> CFloat -> Ptr CInt -> IO CFloat +#ccall remquol , CLDouble -> CLDouble -> Ptr CInt -> IO CLDouble+#ccall rint , CDouble -> IO CDouble +#ccall rintf , CFloat -> IO CFloat +#ccall rintl , CLDouble -> IO CLDouble+#ccall round , CDouble -> IO CDouble +#ccall roundf , CFloat -> IO CFloat +#ccall roundl , CLDouble -> IO CLDouble+#ccall scalbln , CDouble -> CLong -> IO CDouble +#ccall scalblnf , CFloat -> CLong -> IO CFloat +#ccall scalblnl , CLDouble -> CLong -> IO CLDouble+#ccall scalbn , CDouble -> CInt -> IO CDouble +#ccall scalbnf , CFloat -> CInt -> IO CFloat +#ccall scalbnl , CLDouble -> CInt -> IO CLDouble+#ccall sin , CDouble -> IO CDouble +#ccall sinf , CFloat -> IO CFloat +#ccall sinh , CDouble -> IO CDouble +#ccall sinhf , CFloat -> IO CFloat +#ccall sinhl , CLDouble -> IO CLDouble+#ccall sinl , CLDouble -> IO CLDouble+#ccall sqrt , CDouble -> IO CDouble +#ccall sqrtf , CFloat -> IO CFloat +#ccall sqrtl , CLDouble -> IO CLDouble+#ccall tan , CDouble -> IO CDouble +#ccall tanf , CFloat -> IO CFloat +#ccall tanh , CDouble -> IO CDouble +#ccall tanhf , CFloat -> IO CFloat +#ccall tanhl , CLDouble -> IO CLDouble+#ccall tanl , CLDouble -> IO CLDouble+#ccall tgamma , CDouble -> IO CDouble +#ccall tgammaf , CFloat -> IO CFloat +#ccall tgammal , CLDouble -> IO CLDouble+#ccall trunc , CDouble -> IO CDouble +#ccall truncf , CFloat -> IO CFloat +#ccall truncl , CLDouble -> IO CLDouble
+ src/Bindings/C/Stddef.hsc view
@@ -0,0 +1,9 @@+#include <bindings.macros.h>+#include <stddef.h>++-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html>++module Bindings.C.Stddef where+import Foreign++#pointer NULL
+ src/Bindings/C/Stdio.hsc view
@@ -0,0 +1,53 @@+#include <bindings.macros.h>+#include <stdio.h>++-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html>++module Bindings.C.Stdio where+import Foreign+import Foreign.C++#num BUFSIZ+#num L_tmpnam+#num _IOFBF+#num _IOLBF+#num _IONBF+#num SEEK_CUR+#num SEEK_END+#num SEEK_SET+#num FILENAME_MAX+#num FOPEN_MAX+#num TMP_MAX+#num EOF++#ccall clearerr , Ptr CFile -> IO ()+#ccall fclose , Ptr CFile -> IO CInt+#ccall feof , Ptr CFile -> IO CInt+#ccall ferror , Ptr CFile -> IO CInt+#ccall fflush , Ptr CFile -> IO CInt+#ccall fgetc , Ptr CFile -> IO CInt+#ccall fgetpos , Ptr CFile -> Ptr CFpos -> IO CInt+#ccall fgets , CString -> CInt -> Ptr CFile -> IO CString+#ccall fopen , CString -> CString -> IO (Ptr CFile)+#ccall fputc , CInt -> Ptr CFile -> IO CInt+#ccall fputs , CString -> Ptr CFile -> IO CInt+#ccall fread , Ptr () -> CSize -> CSize -> Ptr CFile -> IO CSize+#ccall freopen , CString -> CString -> Ptr CFile -> IO (Ptr CFile)+#ccall fseek , Ptr CFile -> CLong -> CInt -> IO CInt+#ccall fsetpos , Ptr CFile -> Ptr CFpos -> IO CInt+#ccall ftell , Ptr CFile -> IO CLong+#ccall fwrite , Ptr () -> CSize -> CSize -> Ptr CFile -> IO CSize+#ccall getc , Ptr CFile -> IO CInt+#ccall getchar , IO CInt+#ccall perror , CString -> IO ()+#ccall putc , CInt -> Ptr CFile -> IO CInt+#ccall putchar , CInt -> IO CInt+#ccall puts , CString -> IO CInt+#ccall remove , CString -> IO CInt+#ccall rename , CString -> CString -> IO CInt+#ccall rewind , Ptr CFile -> IO ()+#ccall setbuf , Ptr CFile -> CString -> IO ()+#ccall setvbuf , Ptr CFile -> CString -> CInt -> CSize -> IO CInt+#ccall tmpfile , IO (Ptr CFile)+#ccall ungetc , CInt -> Ptr CFile -> IO CInt+
+ src/Bindings/C/String.hsc view
@@ -0,0 +1,31 @@+#include <bindings.macros.h>+#include <string.h>++-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/string.h.html>++module Bindings.C.String where+import Foreign+import Foreign.C++#ccall memchr , Ptr () -> CInt -> CSize -> IO (Ptr ())+#ccall memcmp , Ptr () -> Ptr () -> CSize -> IO CInt+#ccall memcpy , Ptr () -> Ptr () -> CSize -> IO (Ptr ())+#ccall memmove , Ptr () -> Ptr () -> CSize -> IO (Ptr ())+#ccall memset , Ptr () -> CInt -> CSize -> IO (Ptr ())+#ccall strcat , CString -> CString -> IO CString+#ccall strchr , CString -> CInt -> IO CString+#ccall strcmp , CString -> CString -> IO CInt+#ccall strcoll , CString -> CString -> IO CInt+#ccall strcpy , CString -> CString -> IO CString+#ccall strcspn , CString -> CString -> IO CSize+#ccall strerror , CInt -> IO CString+#ccall strlen , CString -> IO CSize+#ccall strncat , CString -> CString -> CSize -> IO CString+#ccall strncmp , CString -> CString -> CSize -> IO CInt+#ccall strncpy , CString -> CString -> CSize -> IO CString+#ccall strpbrk , CString -> CString -> IO CString+#ccall strrchr , CString -> CInt -> IO CString+#ccall strspn , CString -> CString -> IO CSize+#ccall strstr , CString -> CString -> IO CString+#ccall strtok , CString -> CString -> IO CString+#ccall strxfrm , CString -> CString -> CSize -> IO CSize
+ src/Bindings/C/Time.hsc view
@@ -0,0 +1,35 @@+#include <bindings.macros.h>+#include <time.h>++-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html>++module Bindings.C.Time where+import Foreign+import Foreign.C++#integral_t clock_t+#integral_t time_t++#starttype struct tm+#field tm_sec , CInt+#field tm_min , CInt+#field tm_hour , CInt+#field tm_mday , CInt+#field tm_mon , CInt+#field tm_year , CInt+#field tm_wday , CInt+#field tm_yday , CInt+#field tm_isdst , CInt+#stoptype++#num CLOCKS_PER_SEC+#num TIMER_ABSTIME++#ccall clock , IO <clock_t>+#ccall difftime , <time_t> -> <time_t> -> IO CDouble+#ccall gmtime , Ptr <time_t> -> IO (Ptr <tm>)+#ccall localtime , Ptr <time_t> -> IO (Ptr <tm>)+#ccall mktime , Ptr <tm> -> IO <time_t>+#ccall strftime , CString -> CSize -> CString -> Ptr <tm> -> IO CSize+#ccall time , Ptr <time_t> -> IO <time_t>+
− src/Bindings/Utilities.hs
@@ -1,67 +0,0 @@--module Bindings.Utilities (-- GlobalVariable, writeGlobalVariable, readGlobalVariable,- Callback(..)-- ) where--import Foreign-import Foreign.C-import Data.Int---- | 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".--newtype (Storable a) => GlobalVariable a = GlobalVariable (Ptr a)--writeGlobalVariable :: (Storable a) => GlobalVariable a -> a -> IO ()-writeGlobalVariable (GlobalVariable p) v = poke p v--readGlobalVariable :: (Storable a) => GlobalVariable a -> IO a-readGlobalVariable (GlobalVariable p) = peek p---- | 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-- -- | The associated type is the function type- -- as it is used in Haskell.-- type F cb :: *-- -- | 'nullCallback' can be used like 'Foreign.Ptr.nullFunPtr'.-- nullCallback :: cb-- -- | 'makeCallback' takes a Haskell function and- -- gives a representation of it in the form of the- -- type expected by foreign code.-- makeCallback :: F cb -> IO cb-- -- | 'freeCallback' should be called on all values returned- -- by 'makeCallback' after they are no longer going to be- -- used. Most of the time this class method will just use- -- 'Foreign.Ptr.freeHaskellFunPtr'.-- freeCallback :: cb -> IO ()-- -- | 'withCallback' just inserts an action between- -- calls to 'makeCallback' and 'freeCallback'.- -- Of course, it can't be used when foreign code- -- will save such action for latter use.-- withCallback :: F cb -> (cb -> IO a) -> IO a- withCallback f c = do- made <- makeCallback f- result <- c made- freeCallback made- return result-
src/bindings.macros.h view
@@ -1,188 +1,190 @@-#define hsc_bindings_initialize(dummy)\- char bindings_buffer[1000]; \- char bindings_buffer2[1000];+#define bindings_initialize(dummy)\+ char conid_buffer[1000] = "C'"; \+ char varid_buffer[1000] = "c'"; \+ char ptr_buffer[1000] = "p'"; \+ char decimal_buffer[1000]; \+ char wrapper_buffer[1000] = "mk'"; -#define bindings_varid(name) \- (strcpy(bindings_buffer+1,name+(strspn(name," "))), \- bindings_buffer[0]='_', \- islower(bindings_buffer[1])?bindings_buffer+1:bindings_buffer)+#define bc_varid(name) \+ (strcpy(varid_buffer+2,name),varid_buffer) -#define bindings_conid(name) \- (strcpy(bindings_buffer,name+(strspn(name," "))), \- bindings_buffer[0] = toupper(bindings_buffer[0]), \- bindings_buffer)+#define bc_conid(name) \+ (strcpy(conid_buffer+2,name),conid_buffer) -#define bindings_integer(name) \+#define bc_ptrid(name) \+ (strcpy(ptr_buffer+2,name),ptr_buffer)++#define bc_decimal(name) \ (((name)>0) \- ? sprintf(bindings_buffer2,"%llu", \+ ? sprintf(decimal_buffer,"%llu", \ (long long unsigned)(name)) \- : sprintf(bindings_buffer2,"%lld", \+ : sprintf(decimal_buffer,"%lld", \ (long long)(name)) \- , bindings_buffer2 )+ , decimal_buffer ) -#define hsc_bindings_export_varids(name) \+#define bc_wrapper(name) \+ (strcpy(wrapper_buffer+3,name),wrapper_buffer)++#define bc_printtype(name) \ { \- char buf[50000]; \- char *p = buf; \- char *p2 = p; \- strcpy(buf,# name); \- while (*p) \- if (*p == '|') p++; \- else \+ char pb[strlen(name)+1]; \+ strcpy (pb,name); \+ char *p = pb; \+ while (p) \+ { \+ char *p1 = strpbrk(p,"<"); \+ char *p2 = strpbrk(p,">"); \+ if (p1 && p2) \ { \- p2 = p; \- while (*p2 && *p2!='|') p2++; \- if (*p2=='|') *(p2++) = '\0'; \- printf("%s,",bindings_varid(p)); \- p = p2; \+ printf("%.*s",(int)(p1-p),p); \+ p = p1; \+ if (p1 < p2) \+ { \+ printf(" %s ",bc_conid(strtok(p1,"<>"))); \+ p = ++p2; \+ } \ } \- printf("\n"); \+ else \+ { \+ printf("%s",p); \+ p = NULL; \+ } \+ } \ } -#define hsc_bindings_export_conids(name) \+#define hsc_num(name) \ { \- char buf[50000]; \- char *p = buf; \- char *p2 = p; \- strcpy(buf,# name); \- while (*p) \- if (*p == '|') p++; \- else \- { \- p2 = p; \- while (*p2 && *p2!='|') p2++; \- if (*p2=='|') *(p2++) = '\0'; \- printf("%s(..),",bindings_conid(p)); \- p = p2; \- } \- printf("\n"); \+ bindings_initialize(); \+ printf("%s = %s ; %s :: (Num a) => a\n", \+ bc_varid(# name),bc_decimal(name),bc_varid(# name)); \ } -#define hsc_bindings_integer_like(name,type) \- printf("%s = %s :: %s\n",bindings_varid(# name), \- bindings_integer(name),# type);--#define hsc_bindings_int(name) \- printf ("%s = %d :: CInt\n", \- bindings_varid(# name),(int)(name));--#define hsc_bindings_char(name) \- printf ("%s = %d :: CChar\n", \- bindings_varid(# name),(int)(name));--#define hsc_bindings_size(name) \- printf ("%s = %zu :: CSize\n", \- bindings_varid(# name),(size_t)(name));--#define hsc_bindings_long(name) \- printf ("%s = %s :: CLong\n", \- bindings_varid(# name),bindings_integer(name));--#define hsc_bindings_ulong(name) \- printf ("%s = %s :: CULong\n", \- bindings_varid(# name),bindings_integer(name));+#define hsc_fractional(name) \+ { \+ bindings_initialize(); \+ printf("%s = %Le ; %s :: (Fractional a) => a\n", \+ bc_varid(# name),(long double)(name),bc_varid(# name)); \+ } -#define hsc_bindings_short(name) \- printf ("%s = %s :: CShort\n", \- bindings_varid(# name),bindings_integer(name));+#define hsc_pointer(name) \+ { \+ bindings_initialize(); \+ printf("%s = wordPtrToPtr (%zu :: WordPtr) ; %s :: Ptr a\n", \+ bc_varid(# name),(size_t)(name),bc_varid(# name)); \+ } -#define hsc_bindings_ptr(name,htype) \- printf ("%s = wordPtrToPtr (%zu :: WordPtr) :: %s\n", \- bindings_varid(# name),(size_t)(name),# htype);+#define hsc_ccall(name,type) \+ { \+ bindings_initialize(); \+ printf("foreign import ccall \"%s\" %s :: ", \+ # name,bc_varid(# name)); \+ bc_printtype(# type); \+ printf("\n"); \+ printf("foreign import ccall \"&%s\" %s :: FunPtr (", \+ # name,bc_ptrid(# name)); \+ bc_printtype(# type); \+ printf(")\n"); \+ } -#define hsc_bindings_funptr(name,htype) \- printf ("%s = castPtrToFunPtr $ wordPtrToPtr (%zu :: WordPtr) :: %s\n", \- bindings_varid(# name),(size_t)(name),# htype);+#define hsc_cinline(name,type) \+ { \+ bindings_initialize(); \+ printf("foreign import ccall \"%s\" %s :: ", \+ "inline_"# name,bc_varid(# name)); \+ bc_printtype(# type); \+ printf("\n"); \+ } -#define hsc_bindings_num(name) \- if ((name)>0) \- printf ("%s = %lu :: (Num a) => a\n", \- bindings_varid(# name),(long unsigned)(name)); \- else \- printf ("%s = %ld :: (Num a) => a\n", \- bindings_varid(# name),(long)(name));+#define hsc_globalvar(name,type) \+ { \+ bindings_initialize(); \+ printf("foreign import ccall \"&%s\" %s :: %s", \+ # name,bc_ptrid(# name),"Ptr ("); \+ bc_printtype(# type); \+ printf(")\n"); \+ } -#define hsc_bindings_frac(name) \- printf ("%s = %Le :: (Fractional a) => a\n", \- bindings_varid(# name),(long double)(name));+#define hsc_integral_t(name) \+ { \+ bindings_initialize(); \+ char fulltype[] = # name; \+ char type[1000]; \+ char *p = strtok(fulltype," "); \+ while (p) {strcpy(type,p); p = strtok(NULL," ");} \+ printf("type %s = %s%zu\n",bc_conid(type), \+ (name)(-1)<(name)(0)?"Int":"Word",sizeof(name)*8) ; \+ } -#define hsc_bindings_function(name,type) \- printf("foreign import ccall \"%s\" %s :: %s\n", \- # name,bindings_varid(# name),# type);+#define hsc_opaque_t(name) \+ { \+ bindings_initialize(); \+ printf("data %s = %s\n",bc_conid(# name),bc_conid(# name)); \+ } -#define hsc_bindings_starttype(name) \+#define hsc_callback(name,type) \ { \- name *refpointer = 0; \- char *type1 = # name; \- int nfields = 0; \- char *fieldnames[100]; \- char *fieldtypes[100]; \- int is_array[100]; \- int array_size[100]; \- size_t fieldoffsets[100]; \- size_t typesize = sizeof (name); \- int i; \- for(i=0;type1[i] && !isspace(type1[i]);i++); \- if (isspace(type1[i])) type1 += i+1;+ bindings_initialize(); \+ printf("type %s = FunPtr (",bc_conid(# name)); \+ bc_printtype(# type); \+ printf(")\n"); \+ printf("foreign import ccall \"wrapper\" %s\n", \+ bc_wrapper(# name)); \+ printf(" :: ("); \+ bc_printtype(# type); \+ printf(")\n"); \+ printf(" -> IO %s\n",bc_conid(# name)); \+ } -#define hsc_bindings_field(name,type) \- fieldnames[nfields] = # name; \- fieldtypes[nfields] = # type; \- is_array[nfields] = 0; \- fieldoffsets[nfields] = (size_t) &(refpointer->name); \- nfields++;+#define hsc_starttype(name) \+ { \+ bindings_initialize(); \+ name *refpointer = 0; \+ char fulltype[] = # name; \+ char type[1000]; \+ char *p = strtok(fulltype," "); \+ while (p) {strcpy(type,p); p = strtok(NULL," ");} \+ int nfields = 0; \+ size_t typesize = sizeof(name); \+ char *fieldnames[1000], *fieldtypes[1000]; \+ size_t fieldoffsets[1000]; -#define hsc_bindings_array_field(name,type,size) \- fieldnames[nfields] = # name; \- fieldtypes[nfields] = # type; \- is_array[nfields] = 1; \- array_size[nfields] = size; \- fieldoffsets[nfields] = (size_t) (refpointer->name); \- nfields++;+#define hsc_field(name,type) \+ fieldnames[nfields] = # name; \+ fieldtypes[nfields] = # type; \+ fieldoffsets[nfields] = (size_t) &(refpointer->name); \+ nfields++; -#define hsc_bindings_stoptype(dummy) \- printf("data %s = %s", bindings_conid(type1), \- bindings_conid(type1)); \- if (nfields>0) printf (" {"); \- for(i=0;i<nfields;i++) \- { \- printf(is_array[i]?"%s'%s :: [%s]":"%s'%s :: %s", \- bindings_varid(type1), fieldnames[i], fieldtypes[i]); \- if (i+1<nfields) printf(" , "); \- } \- if (nfields>0) printf ("}"); \- printf("\ninstance Storable %s where {sizeOf _ = %zu ; " \- "alignment = sizeOf ; peek p = ", bindings_conid(type1), \- typesize); \- for(i=0;i<nfields;i++) \+#define hsc_stoptype(dummy) \+ printf("data %s = %s",bc_conid(type),bc_conid(type)); \+ if (nfields>0) \ { \- if (is_array[i]) \- printf("peekArray %d (plusPtr p %zu) >>= \\v%d -> ", \- array_size[i],fieldoffsets[i],i); \- else \- printf("peekByteOff p %zu >>= \\v%d -> ", \- fieldoffsets[i],i); \+ printf (" {"); \+ int i; \+ for(i=0;i<nfields;i++) \+ { \+ printf("%s'%s :: ",type,fieldnames[i]); \+ bc_printtype(fieldtypes[i]); \+ if (i+1<nfields) printf(" , "); \+ } \+ printf ("}"); \ } \- printf("return $ %s ",bindings_conid(type1)); \- for(i=0;i<nfields;i++) printf("v%d ",i); \- printf(" ; poke p (%s ",bindings_conid(type1)); \- for(i=0;i<nfields;i++) printf("v%d ",i); \- printf(") = "); \- for(i=0;i<nfields;i++) \- if (is_array[i]) \- printf("pokeArray (plusPtr p %zu) (take %d v%d) >> ", \- fieldoffsets[i],array_size[i],i); \- else \- printf("pokeByteOff p %zu v%d >> ", \- fieldoffsets[i],i); \- printf("return () }"); \+ printf("\n"); \+ printf("instance Storable %s where\n",bc_conid(type)); \+ printf(" sizeOf _ = %zu\n",typesize); \+ printf(" alignment = sizeOf\n"); \+ printf(" peek p = do\n"); \+ int i; \+ for(i=0;i<nfields;i++) \+ printf(" v%d <- peekByteOff p %zu\n",i,fieldoffsets[i]); \+ printf(" return $ %s",bc_conid(type)); \+ for(i=0;i<nfields;i++) printf(" v%d",i); \+ printf("\n"); \+ printf(" poke p (%s",bc_conid(type)); \+ for(i=0;i<nfields;i++) printf(" v%d",i); \+ printf(" ) = do\n"); \+ for(i=0;i<nfields;i++) \+ printf(" pokeByteOff p %zu v%d\n",fieldoffsets[i],i); \+ printf(" return ()\n"); \ } -#define hsc_bindings_globalvar(name,type) \- printf("foreign import ccall \"&%s\" %s", \- # name,bindings_varid(# name)); \- printf(" :: GlobalVariable (Ptr (%s))\n",# type); -#define hsc_bindings_equivalent_integer(t) \- printf("%s",(t)(-1)<(t)0?"Int":"Word"); \- printf("%zu",sizeof(t)*8);