[add c-- style ops to prim, make HsChar unsigned
John Meacham <john@repetae.net>**20070523092617] hunk ./C/Arch.hs 93
-    Nothing -> Op.TyBits (Op.BitsExt s) Op.HintNone
+    Nothing -> f s
hunk ./C/Arch.hs 97
-        _ -> Op.TyBits (Op.BitsExt s) Op.HintNone
+        _ -> f s
+  where
+    f "float" = Op.TyBits  (Op.BitsExt "float") Op.HintFloat
+    f "double" = Op.TyBits (Op.BitsExt "double") Op.HintFloat
+    f "int" = Op.TyBits (Op.BitsExt "int") Op.HintSigned
+    f "unsigned int" = Op.TyBits (Op.BitsExt "unsigned int") Op.HintUnsigned
+    f "uintmax_t" = Op.TyBits (Op.BitsExt "uintmax_t") Op.HintUnsigned
+    f "intmax_t" = Op.TyBits (Op.BitsExt "intmax_t") Op.HintSigned
+    f "uintptr_t" = Op.TyBits Op.BitsPtr Op.HintUnsigned
+    f "intptr_t" = Op.TyBits Op.BitsPtr Op.HintSigned
+    f "HsPtr" = Op.TyBits Op.BitsPtr Op.HintUnsigned
+    f "HsFunPtr" = Op.TyBits Op.BitsPtr Op.HintUnsigned
+    f s = Op.TyBits (Op.BitsExt s) Op.HintNone
hunk ./C/Prims.hs 3
-import Data.Generics
hunk ./C/Prims.hs 4
-
+import Data.Typeable
hunk ./C/Prims.hs 6
+
hunk ./C/Prims.hs 11
+import qualified C.Op as Op
hunk ./C/Prims.hs 28
-    deriving(Typeable, Data, Eq, Ord, Show)
+    deriving(Typeable, Eq, Ord, Show)
hunk ./C/Prims.hs 69
-    deriving(Typeable, Data, Eq, Ord, Show)
+    | Op {
+        primCOp :: Op.Op Op.Ty,
+        primRetTy :: Op.Ty
+        }
+    deriving(Typeable, Eq, Ord, Show)
hunk ./C/Prims.hs 77
-    deriving(Typeable, Data, Eq, Ord, Show)
+    deriving(Typeable, Eq, Ord, Show)
hunk ./C/Prims.hs 80
-instance Data PackedString where
-
hunk ./C/Prims.hs 91
+primIsCheap Op { primCOp = op } = Op.isCheap op
hunk ./C/Prims.hs 104
-primIsConstant PrimString {} = True
hunk ./C/Prims.hs 105
+primIsConstant Op { primCOp = op } = Op.isEagerSafe op
hunk ./C/Prims.hs 116
-primEagerSafe PrimString {} = True
hunk ./C/Prims.hs 118
+primEagerSafe Op { primCOp = op } = Op.isEagerSafe op
hunk ./C/Prims.hs 138
-    deriving(Typeable, Data, Eq, Ord, Show)
+    deriving(Typeable,  Eq, Ord, Show)
hunk ./C/Prims.hs 155
+    pprint Op { primCOp = op, primRetTy = rt } = parens (pprint rt) <> pprint op
hunk ./C/Prims.hs 158
+    pprint PrimTypeInfo { primArgType = at, primTypeInfo = PrimAlignmentOf } = text "alignmentof" <> parens (text at)
+    pprint PrimTypeInfo { primArgType = at, primTypeInfo = PrimTypeIsSigned } = text "is_signed" <> parens (text at)
hunk ./C/Prims.hs 163
+instance DocLike d => PPrint d Op.Ty where
+    pprintPrec n p = text (showsPrec n p "")
+instance (DocLike d,Show v) => PPrint d (Op.Op v) where
+    pprintPrec n p = text (showsPrec n p "")
+
hunk ./data/HsFFI.h 9
-typedef int32_t HsChar;
+typedef uint32_t HsChar;