packages feed

bindings-common 0.1.4 → 0.2

raw patch · 10 files changed

+873/−218 lines, 10 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Bindings.C: _CLOCKS_PER_SEC :: CClock
- Bindings.C: asctime :: Ptr Tm -> IO CString
- Bindings.C: ctime :: Ptr CTime -> IO CString
- Bindings.C: data Timeval
+ 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: atexit :: FunPtr (IO ()) -> IO CInt
+ 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: 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: 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: 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: 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: 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: 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: 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: class (Storable cb) => Callback cb where { type family F cb :: *; { withCallback f c = do made <- makeCallback f result <- c made freeCallback made return result } }

Files

bindings-common.cabal view
@@ -4,12 +4,12 @@ synopsis:   Low-level library bindings, base package. description: -  The @bindings-*@ set of packages contain low level bindings+  The @bindings-*@ set of packages contains low level bindings   for established libraries, and is aimed at developers of higher   level modules that can use it as foundation. They all mimic the-  exact names and functionality of the original libraries. For+  names and functionality of the original libraries. For   a specific library, look for package @bindings-library_name@.-version: 0.1.4+version: 0.2 license: BSD3 license-file: LICENSE maintainer: Maurício C. Antunes@@ -18,13 +18,11 @@ category: FFI library   hs-source-dirs: src-  c-sources:-    src/ctypes.c-    src/cfunctions.c-    src/cconstants.c+  include-dirs: src+  install-includes:+    bindings.macros.h   extensions:     ForeignFunctionInterface-    TypeSynonymInstances     ScopedTypeVariables     MultiParamTypeClasses     TypeFamilies@@ -33,7 +31,3 @@     Bindings     Bindings.Utilities     Bindings.C-  other-modules:-    CFunctions-    CConstants-    CTypes
− src/Bindings/C.hs
@@ -1,26 +0,0 @@-module Bindings.C (--    -- * @time.h@--    -- | <http://www.cplusplus.com/reference/clibrary/ctime>--    clock,-    difftime,-    mktime,-    time,-    asctime,-    ctime,-    gmtime,-    localtime,-    strftime,-    _CLOCKS_PER_SEC,-    Tm,--    -- * @sys/time.h@--    Timeval,-- ) where-import CFunctions-import CTypes-import CConstants
+ src/Bindings/C.hsc view
@@ -0,0 +1,699 @@+#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|atexit+  #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 atexit , FunPtr (IO ()) -> 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/CConstants.hs
@@ -1,7 +0,0 @@-module CConstants where-import Foreign-import Foreign.C-import CTypes--foreign import ccall _CLOCKS_PER_SEC :: CClock-
− src/CFunctions.hs
@@ -1,32 +0,0 @@-module CFunctions where -import Foreign-import Foreign.C-import CTypes--foreign import ccall clock-    :: IO CClock--foreign import ccall difftime-    :: CTime -> CTime -> IO CDouble--foreign import ccall mktime-    :: Ptr Tm -> IO CTime--foreign import ccall time-    :: Ptr CTime -> IO CTime--foreign import ccall asctime-    :: Ptr Tm -> IO CString--foreign import ccall ctime-    :: Ptr CTime -> IO CString--foreign import ccall gmtime-    :: Ptr CTime -> IO (Ptr Tm)--foreign import ccall localtime-    :: Ptr CTime -> IO (Ptr Tm)--foreign import ccall strftime-    :: CString -> CSize -> CString -> Ptr Tm -> IO CSize-
− src/CTypes.hs
@@ -1,75 +0,0 @@-module CTypes where-import Foreign-import Foreign.C---- time.h--data Tm = Tm {-    tm'sec,-    tm'min,-    tm'hour,-    tm'mday,-    tm'mon,-    tm'year,-    tm'wday,-    tm'yday,-    tm'isdst :: CInt-   }--instance Storable Tm where-    sizeOf _ = fromIntegral size_of_tm-    alignment = sizeOf-    peek p =-        with 0 $ \p1 -> with 0 $ \p2 -> with 0 $ \p3 ->-        with 0 $ \p4 -> with 0 $ \p5 -> with 0 $ \p6 ->-        with 0 $ \p7 -> with 0 $ \p8 -> with 0 $ \p9 ->-        c2hs_tm p p1 p2 p3 p4 p5 p6 p7 p8 p9 >>-        peek p1 >>= \v1 -> peek p2 >>= \v2 -> peek p3 >>= \v3 ->-        peek p4 >>= \v4 -> peek p5 >>= \v5 -> peek p6 >>= \v6 ->-        peek p7 >>= \v7 -> peek p8 >>= \v8 -> peek p9 >>= \v9 ->-        return $ Tm v1 v2 v3 v4 v5 v6 v7 v8 v9-    poke p (Tm v1 v2 v3 v4 v5 v6 v7 v8 v9) =-        hs2c_tm p v1 v2 v3 v4 v5 v6 v7 v8 v9--foreign import ccall size_of_tm :: CInt--foreign import ccall hs2c_tm-    :: Ptr Tm -> CInt -> CInt -> CInt -> CInt ->-       CInt -> CInt -> CInt -> CInt -> CInt -> IO ()--foreign import ccall c2hs_tm-    :: Ptr Tm -> Ptr CInt -> Ptr CInt -> Ptr CInt -> Ptr CInt ->-       Ptr CInt -> Ptr CInt -> Ptr CInt -> Ptr CInt ->-       Ptr CInt -> IO ()---- sys/time.h--data Timeval = Timeval {timeval'tv_sec, timeval'tv_usec :: CLong}--instance Storable Timeval where--    sizeOf _ = fromIntegral size_of_timeval--    alignment = sizeOf--    peek p =-        with 0 $ \p1 ->-        with 0 $ \p2 ->--        c2hs_timeval p p1 p2 >>--        peek p1 >>= \v1 ->-        peek p2 >>= \v2 ->--        return $ Timeval {timeval'tv_sec = v1, timeval'tv_usec = v2}--    poke p v = hs2c_timeval p (timeval'tv_sec v) (timeval'tv_usec v)--foreign import ccall "size_of_timeval" size_of_timeval-    :: CInt--foreign import ccall "hs2c_timeval" hs2c_timeval-    :: Ptr Timeval -> CLong -> CLong -> IO ()--foreign import ccall "c2hs_timeval" c2hs_timeval-    :: Ptr Timeval -> Ptr CLong -> Ptr CLong -> IO ()
+ src/bindings.macros.h view
@@ -0,0 +1,168 @@+#define hsc_bindings_initialize(dummy)\+    char bindings_buffer[1000]; \+    char bindings_buffer2[1000];++#define bindings_varid(name) \+    (strcpy(bindings_buffer+1,name+(strspn(name," "))), \+     bindings_buffer[0]='_', \+     islower(bindings_buffer[1])?bindings_buffer+1:bindings_buffer)++#define bindings_conid(name) \+    (strcpy(bindings_buffer,name+(strspn(name," "))), \+     bindings_buffer[0] = toupper(bindings_buffer[0]), \+     bindings_buffer)++#define bindings_integer(name) \+    (((name)>0) \+        ? sprintf(bindings_buffer2,"%llu", \+          (long long unsigned)(name)) \+        : sprintf(bindings_buffer2,"%lld", \+          (long long)(name)) \+    , bindings_buffer2 )++#define hsc_bindings_export_varids(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_varid(p)); \+                p = p2; \+            } \+        printf("\n"); \+    }++#define hsc_bindings_export_conids(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"); \+    }++#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_bindings_short(name) \+  printf ("%s = %s :: CShort\n", \+    bindings_varid(# name),bindings_integer(name));++#define hsc_bindings_ptr(name,htype) \+  printf ("%s =  wordPtrToPtr (%zu :: WordPtr) :: %s\n", \+    bindings_varid(# name),(size_t)(name),# htype);++#define hsc_bindings_funptr(name,htype) \+  printf ("%s = castPtrToFunPtr $ wordPtrToPtr (%zu :: WordPtr) :: %s\n", \+    bindings_varid(# name),(size_t)(name),# htype);++#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_bindings_frac(name) \+  printf ("%s = %Le :: (Fractional a) => a\n", \+    bindings_varid(# name),(long double)(name));++#define hsc_bindings_function(name,type) \+    printf("foreign import ccall \"%s\" %s :: %s\n", \+      # name,bindings_varid(# name),# type);++#define hsc_bindings_starttype(name) \+    { \+        name *refpointer = 0; \+        char *type1 = # name; \+        int nfields = 0; \+        char *fieldnames[100]; \+        char *fieldtypes[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;++#define hsc_bindings_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("%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++) \+        { \+            printf("peekByteOff p %zu >>= \\v%d -> ", \+              fieldoffsets[i],i); \+        } \+        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++) printf("pokeByteOff p %zu v%d >> ", \+          fieldoffsets[i],i); \+        printf("return () }"); \+    }++#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);
− src/cconstants.c
@@ -1,7 +0,0 @@-#include <time.h>--clock_t _CLOCKS_PER_SEC (void)-{-    return CLOCKS_PER_SEC;-}-
− src/cfunctions.c
@@ -1,2 +0,0 @@-#include <time.h>-
− src/ctypes.c
@@ -1,57 +0,0 @@-#include <time.h>--int size_of_tm (void)-{-    return sizeof (struct tm);-}--void hs2c_tm (struct tm *p,-    int p1, int p2, int p3,-    int p4, int p5, int p6,-    int p7, int p8, int p9)-{-    p->tm_sec = p1;-    p->tm_min = p2;-    p->tm_hour = p3;-    p->tm_mday = p4;-    p->tm_mon = p5;-    p->tm_year = p6;-    p->tm_wday = p7;-    p->tm_yday = p8;-    p->tm_isdst = p9;-}--void c2hs_tm (struct tm *p,-    int *p1, int *p2, int *p3,-    int *p4, int *p5, int *p6,-    int *p7, int *p8, int *p9)-{-    *p1 = p->tm_sec;-    *p2 = p->tm_min;-    *p3 = p->tm_hour;-    *p4 = p->tm_mday;-    *p5 = p->tm_mon;-    *p6 = p->tm_year;-    *p7 = p->tm_wday;-    *p8 = p->tm_yday;-    *p9 = p->tm_isdst;-}--#include <sys/time.h>--int size_of_timeval (void)-{-    return sizeof (struct timeval);-}--void hs2c_timeval (struct timeval *p, long p1, long p2)-{-    p->tv_sec = p1;-    p->tv_usec = p2;-}--void c2hs_timeval (struct timeval *p, long *p1, long *p2)-{-    *p1 = p->tv_sec;-    *p2 = p->tv_usec;-}