[switch AddrOf to use packed strings
John Meacham <john@repetae.net>**20061218111922] hunk ./C/FromGrin.hs 85
-    AddrOf t -> return $ expressionRaw ('&':t)
+    AddrOf t -> return $ expressionRaw ('&':unpackPS t)
hunk ./C/FromGrin.hs 280
-        return $ expressionRaw ('&':t)
+        return $ expressionRaw ('&':unpackPS t)
hunk ./C/FromGrin.hs 520
-    AddrOf t -> return $ expressionRaw ('&':t)
+    AddrOf t -> return $ expressionRaw ('&':unpackPS t)
hunk ./C/Prims.hs 25
-emptyExtType = ""
hunk ./C/Prims.hs 33
-    | Operator { primOp :: String, primArgTypes ::  [ExtType], primRetType :: ExtType }   -- C operator
-    | Func { funcIOLike :: Bool, funcName :: PackedString, primArgTypes :: [ExtType], primRetType :: ExtType }   -- function call with C calling convention
-    | IFunc { primArgTypes :: [ExtType], primRetType :: ExtType }-- indirect function call
-    | AddrOf String                                              -- address of linker name
-    | Peek { primArgType :: ExtType }                            -- read value from memory
-    | Poke { primArgType :: ExtType }                            -- write value to memory
-    | CCast { primArgType :: ExtType, primRetType :: ExtType }   -- Cast from one basic type to another, possibly lossy.
-    | PrimTypeInfo { primArgType :: ExtType,  primRetType :: ExtType, primTypeInfo :: PrimTypeInfo }
+    | Operator {
+        primOp :: String,
+        primArgTypes ::  [ExtType],
+        primRetType :: ExtType
+        }   -- C operator
+    | Func {
+        funcIOLike :: Bool,
+        funcName :: PackedString,
+        primArgTypes :: [ExtType],
+        primRetType :: ExtType
+        }   -- function call with C calling convention
+    | IFunc {
+        primArgTypes :: [ExtType],
+        primRetType :: ExtType
+        } -- indirect function call
+    | AddrOf PackedString              -- address of linker name
+    | Peek { primArgType :: ExtType }  -- read value from memory
+    | Poke { primArgType :: ExtType }  -- write value to memory
+    | CCast {
+        primArgType :: ExtType,
+        primRetType :: ExtType
+        }   -- Cast from one basic type to another, possibly lossy.
+    | PrimTypeInfo {
+        primArgType :: ExtType,
+        primRetType :: ExtType,
+        primTypeInfo :: PrimTypeInfo
+        }
hunk ./C/Prims.hs 124
-            '&':s -> AddrOf s
-            s -> Func False (packString s) [] emptyExtType
+            '&':s -> AddrOf (packString s)
+            s -> Func False (packString s) [] ""
hunk ./C/Prims.hs 146
-    pprint (AddrOf s) = char '&' <> text s
+    pprint (AddrOf s) = char '&' <> text (unpackPS s)
hunk ./E/FromHs.hs 364
-            prim       = APrim (AddrOf rcn) req
+            prim       = APrim (AddrOf $ packString rcn) req
hunk ./E/ToHs.hs 91
-    f (AddrOf s) = text $ "foreign import ccall \"&" ++ s ++ "\" addr_" ++ mangleIdent s ++ " :: Ptr ()"
+    f (AddrOf s) = text $ "foreign import ccall \"&" ++ unpackPS s ++ "\" addr_" ++ mangleIdent (unpackPS s) ++ " :: Ptr ()"
hunk ./E/ToHs.hs 343
-    return (text $ "unPtr addr_" ++ mangleIdent addr)
+    return (text $ "unPtr addr_" ++ mangleIdent (unpackPS addr))