[add foreign types, interpret Ptr when creating external C types
John Meacham <john@repetae.net>**20120209090647
 Ignore-this: c49bea3938e2edabda9d7528cfb1121a
] hunk ./src/DataConstructors.hs 403
+    f :: Monad m => E -> m ExtTypeInfo
hunk ./src/DataConstructors.hs 408
+    f e@(ELit LitCons { litName = c, litArgs = [ta] }) | c == tc_Ptr = do
+        ExtTypeBoxed b t _ <- g e  -- we know a pointer is a boxed BitsPtr
+        case f ta of
+            Just (ExtTypeBoxed _ _ et) -> return $ ExtTypeBoxed b t (et ++ "*")
+            Just (ExtTypeRaw et) -> return $ ExtTypeBoxed b t (et ++ "*")
+            _ -> return $ ExtTypeBoxed b t "HsPtr"
hunk ./src/DataConstructors.hs 896
+    (tc_CFile,      "FILE"),
+    (tc_CJmpBuf,    "jmp_buf"),
+    (tc_CFpos,      "fpos_t"),
+    (tc_CSigAtomic, "sigatomic_t"),
hunk ./src/DataConstructors.hs 949
-    (tc_CWchar,   "wchar_t"),
-    (tc_CWint,    "wint_t"),
-    (tc_CTime,    "time_t"),
-    (tc_CClock,   "clock_t"),
-    (tc_CSize,    "size_t"),
-    (tc_Unit,     "void"),
-    (tc_State_,   "void"),
-    (tc_Bang_,    "wptr_t")  -- internal rts type
+    (tc_CWchar,     "wchar_t"),
+    (tc_CWint,      "wint_t"),
+    (tc_CTime,      "time_t"),
+    (tc_CClock,     "clock_t"),
+    (tc_CSize,      "size_t"),
+    (tc_Unit,       "void"),
+    (tc_State_,     "void"),
+    (tc_Bang_,      "wptr_t")  -- internal rts type
hunk ./src/data/names.txt 41
-CInt      Jhc.Type.C.CInt
-CUInt     Jhc.Type.C.CUInt
-CTime     Jhc.Type.C.CTime
-CSize     Jhc.Type.C.CSize
-CClock    Jhc.Type.C.CClock
+CInt       Jhc.Type.C.CInt
+CUInt      Jhc.Type.C.CUInt
+CTime      Jhc.Type.C.CTime
+CSize      Jhc.Type.C.CSize
+CClock     Jhc.Type.C.CClock
+CFile      Jhc.Type.C.CFile
+CJmpBuf    Jhc.Type.C.CJmpBuf
+CFpos      Jhc.Type.C.CFpos
+CSigAtomic Jhc.Type.C.CSigAtomic