[add table of FFI type mappings to DataConstructors
John Meacham <john@repetae.net>**20070524225437] hunk ./C/FFI.hs 7
-    Requires(..),
-    nullRequires
+    Requires(..)
hunk ./C/FFI.hs 39
-nullRequires = Requires [] []
hunk ./DataConstructors.hs 252
-worlds = []
hunk ./DataConstructors.hs 362
+-- which C types these convert to in FFI specifications for
+-- figuring out calling conventions. not necessarily related
+-- to the representation.
+-- ideally, these could be set via a pragma
+
+typeTable = [
+    (tc_Char,"wchar_t"),
+    (tc_Int, "int"),
+    (tc_Int8, "int8_t"),
+    (tc_Int16, "int16_t"),
+    (tc_Int32, "int32_t"),
+    (tc_Int64, "int64_t"),
+    (tc_IntMax, "intmax_t"),
+    (tc_IntPtr, "intptr_t"),
+    (tc_Word, "unsigned"),
+    (tc_Word8, "uint8_t"),
+    (tc_Word16, "uint16_t"),
+    (tc_Word32, "uint32_t"),
+    (tc_Word64, "uint64_t"),
+    (tc_WordMax, "uintmax_t"),
+    (tc_WordPtr, "uintptr_t"),
+    (tc_Float, "float"),
+    (tc_Double, "double"),
+    (tc_Addr, "HsPtr"),
+    (tc_FunAddr, "HsFunPtr"),
+
+    (tc_CChar, "char"),
+    (tc_CShort, "short"),
+    (tc_CInt, "int"),
+    (tc_CLong, "long"),
+
+    (tc_CSChar, "signed char"),
+
+    (tc_CUChar, "unsigned char"),
+    (tc_CUShort, "unsigned short"),
+    (tc_CUInt, "unsigned int"),
+    (tc_CULong, "unsigned long"),
+
+    (tc_CWchar, "wchar_t"),
+    (tc_CWint, "wint_t"),
+    (tc_CTime, "time_t")
+    ]
hunk ./DataConstructors.hs 432
-dataTablePrims = DataTable $ Map.fromList ([ (conName x,x) | x <- tbox:tabsurd:tarrow:primitiveTable ] ++ worlds)
+dataTablePrims = DataTable $ Map.fromList ([ (conName x,x) | x <- tbox:tabsurd:tarrow:primitiveTable ])
hunk ./FrontEnd/ParseUtils.hs 36
-import C.FFI
-import HsSyn
-import FrontEnd.SrcLoc
-import FrontEnd.ParseMonad
hunk ./FrontEnd/ParseUtils.hs 37
-import Ratio
hunk ./FrontEnd/ParseUtils.hs 38
+import Data.Monoid
+import Ratio
+
+import C.FFI
+import FrontEnd.ParseMonad
+import FrontEnd.SrcLoc
+import HsSyn
hunk ./FrontEnd/ParseUtils.hs 380
-        let f ["import","primitive"] cname = return $ HsForeignDecl srcLoc (FfiSpec (Import cname nullRequires) Safe Primitive) vname qt
-            f ["import","dotnet"] cname = return $ HsForeignDecl srcLoc (FfiSpec (Import cname nullRequires) Safe DotNet) vname qt
+        let f ["import","primitive"] cname = return $ HsForeignDecl srcLoc (FfiSpec (Import cname mempty) Safe Primitive) vname qt
+            f ["import","dotnet"] cname = return $ HsForeignDecl srcLoc (FfiSpec (Import cname mempty) Safe DotNet) vname qt
hunk ./FrontEnd/ParseUtils.hs 414
-parseImport Nothing hn = return $ Import (show hn) nullRequires
+parseImport Nothing hn = return $ Import (show hn) mempty
hunk ./FrontEnd/ParseUtils.hs 419
-      []            -> return $ Import (show hn) nullRequires
+      []            -> return $ Import (show hn) mempty
hunk ./data/names.txt 12
+CLong     Foreign.C.Types.CLong
+CSChar    Foreign.C.Types.CSChar
+CUChar    Foreign.C.Types.CUChar
+CUShort   Foreign.C.Types.CUShort
+CULong    Foreign.C.Types.CULong