[get rid of CanTypeCheck instancse for grin in favor of Grin.Lint. fix some warnings.
John Meacham <john@repetae.net>**20070531221648] hunk ./Grin/EvalInline.hs 16
-import C.Arch
hunk ./Grin/EvalInline.hs 17
-import Util.UniqueMonad
+import Util.UniqueMonad()
hunk ./Grin/EvalInline.hs 57
-            cu t | tagIsTag t && tagIsWHNF t = return ans where
-                (ts,_) = runIdentity $ findArgsType te t
-                vs = [ Var v ty |  v <- [V 4 .. ] | ty <- ts]
-                ans = NodeC t vs :-> Update p1 (NodeC t vs)
-            cu t = error $ "not updatable:" ++ show t
+--            cu t | tagIsTag t && tagIsWHNF t = return ans where
+--                (ts,_) = runIdentity $ findArgsType te t
+--                vs = [ Var v ty |  v <- [V 4 .. ] | ty <- ts]
+--                ans = NodeC t vs :-> Update p1 (NodeC t vs)
+--            cu t = error $ "not updatable:" ++ show t
hunk ./Grin/EvalInline.hs 130
-    let eval = (funcEval,Tup [earg] :-> ebody) where
-            earg :-> ebody  =  createEval TrailingUpdate (grinTypeEnv grin) tags
+    let --eval = (funcEval,Tup [earg] :-> ebody) where
+        --    earg :-> ebody  =  createEval TrailingUpdate (grinTypeEnv grin) tags
hunk ./Grin/Grin.hs 492
-
-instance CanTypeCheck TyEnv a Ty => CanTypeCheck TyEnv [a] Ty where
-    typecheck _ [] = fail "empty list"
-    typecheck te xs = do
-        ts <- mapM (typecheck te) xs
-        foldl1M_ (same "list") ts
-        return (head ts)
-
-
-same _ t1 t2 | t1 == t2 = return t1
-same msg t1 t2 = fail $ "Types not the same:" <+> parens msg <+> parens (tshow t1) <+> parens (tshow t2)
-
-typLam te (x :-> y) = do
-    x <- typecheck te x
-    y <- typecheck te y
-    return (x,y)
-
-
-
-instance CanTypeCheck TyEnv Exp Ty where
-    typecheck te (e :>>= (v :-> e2)) = do
-        t1 <- typecheck te e
-        t2 <- typecheck te v
-        same (":>>=" <+> show e <+> show v) t1 t2
-        typecheck te e2
-    typecheck te n@(Prim p as) = do
-        let (as',t') = primType p
-        as'' <- mapM (typecheck te) as
-        if as'' == as' then return t' else
-            fail $ "Prim: arguments do not match " ++ show n
-    typecheck te ap@(App fn [v,a] t) | fn == funcApply = do
-        [v',a'] <- mapM (typecheck te) [v,a]
-        if v' == TyNode then return t
-         else fail $ "App apply arg doesn't match: " ++ show ap
-    typecheck te ap@(App fn [v] t) | fn == funcApply = do
-        [v'] <- mapM (typecheck te) [v]
-        if v' == TyNode then return t
-         else fail $ "App apply arg doesn't match: " ++ show ap
-    typecheck te ap@(App fn [v] t) | fn == funcEval = do
-        v' <- typecheck te v
-        if v' == TyPtr TyNode then return t
-         else fail $ "App eval arg doesn't match: " ++ show ap
-    typecheck te a@(App fn as t) = do
-        (as',t') <- findArgsType te fn
-        as'' <- mapM (typecheck te) as
-        if t' == t then
-            if as'' == as' then return t' else
-                fail $ "App: arguments do not match: " ++ show (a,as',t')
-         else fail $ "App: results do not match: " ++ show (a,t,(as',t'))
-    typecheck te (Store v) = do
-        t <- typecheck te v
-        return (TyPtr t)
-    typecheck te Alloc { expValue = v } = do
-        t <- typecheck te v
-        return (TyPtr t)
-    typecheck te (Return v) = do
-        typecheck te v
-    typecheck te (Fetch v) = do
-        (TyPtr t) <- typecheck te v
-        return t
-    typecheck te (Error _ t) = return t
-    typecheck te e@(Update w v) = do
-        (TyPtr t) <- typecheck te w
-        t' <- typecheck te v
-        same (show e) t t'
-        return tyUnit
-    typecheck _ (Case _ []) = fail "empty case"
-    typecheck te (Case v as) = do
-        tv <- typecheck te v
-        (ps,es) <- liftM unzip $ mapM (typLam te) as
-        foldl1M_ (same "case pat") (tv:ps)
-        foldl1M (same $ "case exp: " ++ show (map head $ sortGroupUnder fst (zip es as)) ) (es)
-    typecheck te (Let { expDefs = defs, expBody = body }) = do
-        let nte = extendTyEnv defs te
-        mapM_ (typecheck nte) [ b | FuncDef { funcDefBody = _ :-> b } <- defs ]
-        typecheck nte body
-    typecheck _ t = return (getType t)
-
-instance CanTypeCheck TyEnv Val Ty where
-    typecheck _ (Tag _) = return TyTag
-    typecheck _ (Var _ t) = return t
-    typecheck _ (Lit _ t) = return t
-    typecheck _ (NodeV {}) = return TyNode
-    typecheck te (Tup xs) = do
-        xs <- mapM (typecheck te) xs
-        return $ TyTup xs
-    typecheck x (Const t) = do
-        v <- typecheck x t
-        return (TyPtr v)
-    typecheck te (Index v offset) = do
-        t <- typecheck te v
-        Ty _ <- typecheck te offset
-        return t
-    typecheck _ (ValUnknown ty) = return ty
-    typecheck _ (Addr _) = return $ TyPtr (error "typecheck: Addr")
-    typecheck _ (ValPrim _ _ ty) = return ty
-    typecheck te n@(NodeC tg as) = do
-        (as',_) <- findArgsType te tg
-        as'' <- mapM (typecheck te) as
-        if as'' == as' then return TyNode else
-            fail $ "NodeC: arguments do not match " ++ show n ++ show (as'',as')
-    typecheck _ (Item _ t) = return t
hunk ./Grin/Noodle.hs 10
-import Atom(Atom(),toAtom)
+import Atom(Atom())
hunk ./Grin/Val.hs 1
-module Grin.Val(FromVal(..),ToVal(..),tn_2Tup,valToList,convertName,region_heap) where
+module Grin.Val(
+    FromVal(..),
+    ToVal(..),
+    tn_2Tup,
+    valToList,
+    convertName,
+    region_heap,
+    region_block
+    ) where
hunk ./Grin/Whiz.hs 5
-import Control.Monad.Trans