[remove last traces of c based names, use 'bits*' representation throughout.
John Meacham <john@repetae.net>**20070525031812] hunk ./C/Prims.hs 138
-    deriving(Typeable,  Eq, Ord, Show)
+    deriving(Typeable,  Eq, Ord)
hunk ./C/Prims.hs 141
+instance Show APrim where
+    showsPrec n (APrim p r) | r == mempty = showsPrec n p
+    showsPrec n (APrim p r) = showsPrec n p . shows r
+
hunk ./E/FromHs.hs 470
-    cExpr (HsLit (HsStringPrim s)) = return $ EPrim (APrim (PrimString (packString s)) mempty) [] (rawType "HsPtr")
+    cExpr (HsLit (HsStringPrim s)) = return $ EPrim (APrim (PrimString (packString s)) mempty) [] (rawType "bits<ptr>")
hunk ./E/FromHs.hs 608
+
hunk ./E/FromHs.hs 611
-intConvert i | abs i > integer_cutoff  =  ELit (litCons { litName = dc_Integer, litArgs = [ELit $ LitInt (fromInteger i) (rawType "intmax_t")], litType = tInteger })
-intConvert i =  ELit (litCons { litName = dc_Int, litArgs = [ELit $ LitInt (fromInteger i) (rawType "int")], litType = tInt })
+intConvert i | abs i > integer_cutoff  =  ELit (litCons { litName = dc_Integer, litArgs = [ELit $ LitInt (fromInteger i) (rawType "bits<max>")], litType = tInteger })
+intConvert i =  ELit (litCons { litName = dc_Int, litArgs = [ELit $ LitInt (fromInteger i) (rawType "bits<int>")], litType = tInt })
hunk ./E/FromHs.hs 616
-        True -> (dc_Integer,tInteger,f_fromInteger,"intmax_t")
-        False -> (dc_Int,tInt,f_fromInt,"int")
+        True -> (dc_Integer,tInteger,f_fromInteger,"bits<max>")
+        False -> (dc_Int,tInt,f_fromInt,"bits<int>")
hunk ./E/FromHs.hs 810
-packupString s | all (\c -> c > '\NUL' && c <= '\xff') s = (EPrim (APrim (PrimString (packString s)) mempty) [] (rawType "HsPtr"),True)
+packupString s | all (\c -> c > '\NUL' && c <= '\xff') s = (EPrim (APrim (PrimString (packString s)) mempty) [] (rawType "bits<ptr>"),True)
hunk ./E/PrimOpt.hs 137
-    binOps = [("divide","/"),("plus","+"),("minus","-"),("times","*"),("modulus","%")]
+--    binOps = [("divide","/"),("plus","+"),("minus","-"),("times","*"),("modulus","%")]
hunk ./E/PrimOpt.hs 157
-    primopt op [a,b] t | Just cop <- lookup op binOps = mdo
-        (pa,(ta,sta)) <- extractPrimitive dataTable a
-        (pb,(tb,stb)) <- extractPrimitive dataTable b
-        (bp,(tr,str)) <- boxPrimitive dataTable
-                (EPrim (APrim (Operator cop [ta,ta] tr) mempty) [pa, pb] str) t
-        return bp
-    primopt "equalsChar" [a,b] t = return (EPrim (APrim (Operator "==" ["HsChar","HsChar"] "int") mempty) [a,b] t)
-    primopt "constPeekByte" [a] t = return (EPrim (APrim (Peek "uint8_t") mempty) [a] t)
+--    primopt op [a,b] t | Just cop <- lookup op binOps = mdo
+--        (pa,(ta,sta)) <- extractPrimitive dataTable a
+--        (pb,(tb,stb)) <- extractPrimitive dataTable b
+--        (bp,(tr,str)) <- boxPrimitive dataTable
+--                (EPrim (APrim (Operator cop [ta,ta] tr) mempty) [pa, pb] str) t
+--        return bp
+    primopt "equalsChar" [a,b] t = return (EPrim (APrim (Op (Op.BinOp Op.Eq Op.bits32 Op.bits32) Op.bits_int) mempty) [a,b] t)
+    primopt "constPeekByte" [a] t = return (EPrim (APrim (Peek "bits8") mempty) [a] t)
hunk ./E/Show.hs 66
-    let f (LitInt c t) | t == tCharzh = return $ atom $ (const_color (tshow $ chr i)) where
-            i = fromIntegral c
+    let --f (LitInt c t) | t == tCharzh = return $ atom $ (const_color (tshow $ chr i)) where
+        --    i = fromIntegral c
hunk ./Grin/FromE.hs 448
-        Func True fn as "void" -> return $ Prim prim { primType = (keepIts (map (Ty . toAtom) as),tyUnit) } (args $ tail xs)
+        Func True fn as "void" -> return $ Prim prim { primType = (keepIts (map stringNameToTy as),tyUnit) } (args $ tail xs)
hunk ./Grin/FromE.hs 451
-                pt = Ty (toAtom r)
hunk ./Grin/FromE.hs 497
-    ce ECase { eCaseScrutinee = e, eCaseBind = b, eCaseAlts = as, eCaseDefault = d } | (ELit LitCons { litName = n, litArgs = [] }) <- followAliases (dataTable cenv) (getType e), RawType <- nameType n = do
-            let ty = Ty $ toAtom (show n)
+    ce ECase { eCaseScrutinee = e, eCaseBind = b, eCaseAlts = as, eCaseDefault = d } | (ELit LitCons { litName = n, litArgs = [] }) <- followAliases (dataTable cenv) (getType e), Just ty <- rawNameToTy n = do
hunk ./Grin/FromE.hs 543
-        return (Lit i (Ty $ toAtom (show nn)) :-> x)
+        ty <- rawNameToTy nn
+        return (Lit i ty :-> x)
hunk ./Grin/FromE.hs 741
-fromRawType (ELit LitCons { litName = tname, litArgs = [] })
-    | RawType <- nameType tname = return (Ty $ toAtom (show tname))
-fromRawType _ = fail "not a raw type"
+fromRawType (ELit LitCons { litName = tname, litArgs = [] }) = rawNameToTy tname
+--    | RawType <- nameType tname = return (Ty $ toAtom (show tname))
+--fromRawType _ = fail "not a raw type"
hunk ./Grin/Show.hs 20
+import C.Prims
hunk ./Grin/Show.hs 35
-import Support.FreeVars
hunk ./Grin/Show.hs 36
+import Support.FreeVars
hunk ./Grin/Show.hs 39
+import qualified C.Op as Op
hunk ./Grin/Show.hs 96
+prettyExp vl (Prim Primitive { primAPrim = APrim (Peek t) _ } [v])  = vl <> prim t <> char '[' <> prettyVal v <> char ']'
hunk ./Grin/Show.hs 132
-    | t == tCharzh = char 'c' <> tshow i
-    | t == tIntzh  = char 'i' <> tshow i
+--    | t == tCharzh = char 'c' <> tshow i
+--    | t == tIntzh  = char 'i' <> tshow i
hunk ./Grin/Show.hs 135
+    | TyPrim Op.TyBool <- t  = char 'b' <> tshow i
+    | TyPrim (Op.TyBits _ Op.HintFloat) <- t  = char 'f' <> tshow i
+    | TyPrim (Op.TyBits _ Op.HintCharacter) <- t  = char 'c' <> tshow i
+    | TyPrim (Op.TyBits _ _) <- t  = char 'l' <> tshow i
hunk ./Grin/Show.hs 149
-prettyVal (ValPrim aprim xs ty) = pprint aprim <> tupled (map tshow xs)
+prettyVal (ValPrim aprim [] _ty) = pprint aprim
+prettyVal (ValPrim aprim xs _ty) = pprint aprim <> tupled (map tshow xs)
hunk ./utils/grin.vim 6
-syn match hsType "\<int\|char\|bool\|float\|double\|void\>"
+syn match hsType "\<int\>\|\<char\>\|\<bool\>\|\<float\>\|\<double\>\|\<void\>"
hunk ./utils/grin.vim 8
+syn match hsType "\<[usfc]\?bits[0-9]\+\>"
+syn match hsType "\<[usfc]\?bits<[A-Za-z_]\+>"
hunk ./utils/grin.vim 12
-syn match grinFuncname "\<[fb][^" ]*\>"
+syn match grinFuncname "\<[fb][^i][^" ]*\>"