diff --git a/.hg_archival.txt b/.hg_archival.txt
--- a/.hg_archival.txt
+++ b/.hg_archival.txt
@@ -1,2 +1,2 @@
 repo: db8906263ec6e2f02cd51ed9b583ad96027042e9
-node: 5b05498d29352b5839e0ed78eedef32bdaa4e52e
+node: fd31e86f9340d433a6b137d5ce01a2ffb054b3da
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -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
diff --git a/bindings-common.cabal b/bindings-common.cabal
--- a/bindings-common.cabal
+++ b/bindings-common.cabal
@@ -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"
diff --git a/example/Setup.hs b/example/Setup.hs
deleted file mode 100644
--- a/example/Setup.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env runhaskell
-
-module Main (main) where
-import Distribution.Simple
-
-main = defaultMain
diff --git a/example/example.c b/example/example.c
deleted file mode 100644
--- a/example/example.c
+++ /dev/null
@@ -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;
-
-      }
-
-}
-
diff --git a/example/example.cabal b/example/example.cabal
deleted file mode 100644
--- a/example/example.cabal
+++ /dev/null
@@ -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
diff --git a/example/example.h b/example/example.h
deleted file mode 100644
--- a/example/example.h
+++ /dev/null
@@ -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 *);
-
diff --git a/example/test.hsc b/example/test.hsc
deleted file mode 100644
--- a/example/test.hsc
+++ /dev/null
@@ -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
-
-
diff --git a/src/Bindings.hs b/src/Bindings.hs
deleted file mode 100644
--- a/src/Bindings.hs
+++ /dev/null
@@ -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 {}
diff --git a/src/Bindings/C.hs b/src/Bindings/C.hs
new file mode 100644
--- /dev/null
+++ b/src/Bindings/C.hs
@@ -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
diff --git a/src/Bindings/C.hsc b/src/Bindings/C.hsc
deleted file mode 100644
--- a/src/Bindings/C.hsc
+++ /dev/null
@@ -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
-
-
diff --git a/src/Bindings/C/Errno.hsc b/src/Bindings/C/Errno.hsc
new file mode 100644
--- /dev/null
+++ b/src/Bindings/C/Errno.hsc
@@ -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
diff --git a/src/Bindings/C/Math.hsc b/src/Bindings/C/Math.hsc
new file mode 100644
--- /dev/null
+++ b/src/Bindings/C/Math.hsc
@@ -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
diff --git a/src/Bindings/C/Stddef.hsc b/src/Bindings/C/Stddef.hsc
new file mode 100644
--- /dev/null
+++ b/src/Bindings/C/Stddef.hsc
@@ -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
diff --git a/src/Bindings/C/Stdio.hsc b/src/Bindings/C/Stdio.hsc
new file mode 100644
--- /dev/null
+++ b/src/Bindings/C/Stdio.hsc
@@ -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
+
diff --git a/src/Bindings/C/String.hsc b/src/Bindings/C/String.hsc
new file mode 100644
--- /dev/null
+++ b/src/Bindings/C/String.hsc
@@ -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
diff --git a/src/Bindings/C/Time.hsc b/src/Bindings/C/Time.hsc
new file mode 100644
--- /dev/null
+++ b/src/Bindings/C/Time.hsc
@@ -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>
+
diff --git a/src/Bindings/Utilities.hs b/src/Bindings/Utilities.hs
deleted file mode 100644
--- a/src/Bindings/Utilities.hs
+++ /dev/null
@@ -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
-
diff --git a/src/bindings.macros.h b/src/bindings.macros.h
--- a/src/bindings.macros.h
+++ b/src/bindings.macros.h
@@ -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);
