[make Fetch and Update conversions to C work for indexed arrays
John Meacham <john@repetae.net>**20070522041258] hunk ./C/FromGrin2.hs 354
-convertBody (Fetch v) | getType v == TyPtr tyINode  = do
-    v <- convertVal v
-    simpleRet $ dereference v
+convertBody (Update (Index base off) z) | getType base == TyPtr tyINode = do
+    base <- convertVal base
+    off <- convertVal off
+    z' <- convertVal z
+    return $ indexArray base off `assign` z'
hunk ./C/FromGrin2.hs 364
+convertBody (Fetch (Index base off)) | getType base == TyPtr tyINode = do
+    base <- convertVal base
+    off <- convertVal off
+    simpleRet (indexArray base off)
+convertBody (Fetch v) | getType v == TyPtr tyINode  = do
+    v <- convertVal v
+    simpleRet $ dereference v
hunk ./C/FromGrin2.hs 417
-convertExp (Fetch (Index base off)) | getType base == TyPtr (TyPtr TyNode) = do
-    base <- convertVal base
-    off <- convertVal off
-    return (mempty,indexArray base off)
-convertExp (Update (Index base off) z) | getType z == TyPtr TyNode = do
-    base <- convertVal base
-    off <- convertVal off
-    z' <- convertVal z
-    return $ (indexArray base off `assign` z',emptyExpression)