[clean ups
John Meacham <john@repetae.net>**20100715220144
 Ignore-this: 1a3f3a856db2ed8bd7f62ce059aa57dc
] hunk ./src/FrontEnd/Rename.hs 64
-    --let (ns,ts) = mconcat (map namesHsDecl hsDecls)
-    --    nm = Map.fromList $ foldl f [] (fsts ns)
-    --    tm = Map.fromList $ foldl f [] (fsts ts)
hunk ./src/FrontEnd/Rename.hs 72
-        --f r z@(UnQual n) = let nn = Qual mod n in (z,nn):(nn,nn):r
hunk ./src/FrontEnd/Rename.hs 79
-{-
-addTopLevels ::  [HsDecl]  -> RM a -> RM a
-addTopLevels  hsDecls action = do
-    mod <- getCurrentModule
-    let (ns,ts) = mconcat (map namesHsDecl hsDecls)
-        nm = Map.fromList $ foldl f [] (fsts ns)
-        tm = Map.fromList $ foldl f [] (fsts ts)
-        f r hsName@(getModule -> Just _)
-            | Just _ <- V.fromTupname hsName, Module "Jhc.Basics" <- mod
-                = let nn = hsName in (nn,nn):r
-            | nameName tc_Arrow == hsName, Module "Jhc.Basics" == mod
-                = let nn = hsName in (nn,nn):r
-            | otherwise = error $ "strong bad: " ++ show hsName
-        --f r z@(UnQual n) = let nn = Qual mod n in (z,nn):(nn,nn):r
-        f r z@(getModule -> Nothing) = let nn = qualifyName mod z in (z,nn):(nn,nn):r
-        z ns = mapM mult (filter (\x -> length x > 1) $ groupBy (\a b -> fst a == fst b) (sort ns))
-        mult xs@(~((n,sl):_)) = warn sl "multiply-defined" (show n ++ " is defined multiple times: " ++ show xs )
-    z ns >> z ts
-    withSubTable (nm `Map.union` tm) action
--}
hunk ./src/FrontEnd/Rename.hs 689
-
hunk ./src/FrontEnd/Rename.hs 741
-
-
hunk ./src/FrontEnd/Rename.hs 790
-namesHsDecl :: HsDecl -> ([(HsName, SrcLoc)],[(HsName, SrcLoc)])
-namesHsDecl (HsForeignDecl a _ n _)  = ([(fromValishHsName n,a)],[])
-namesHsDecl decl@(HsFunBind {})  = (getHsNamesAndASrcLocsFromHsDecl decl,  [])
-namesHsDecl (HsPatBind srcLoc p _ _) = (map (,srcLoc) (getNamesFromHsPat p),[])
-namesHsDecl (HsTypeDecl sl n _ _) = ([],[(fromTypishHsName n,sl)])
-namesHsDecl HsDataDecl { hsDeclSrcLoc = sl, hsDeclName = n, hsDeclCons = cs } = ( (concatMap namesHsConDecl cs) ,[(fromTypishHsName n,sl)])
-namesHsDecl (HsNewTypeDecl sl _ n _ c _) = ( (namesHsConDecl c),[(fromTypishHsName n,sl)])
-namesHsDecl cd@(HsClassDecl sl _ ds) = (mconcatMap namesHsDeclTS ds) `mappend` ([],[(z,sl)]) where
-    z = case maybeGetDeclName cd of
-        Just x | nameType x == ClassName -> x
-        --       | otherwise ->  parseName ClassName (show x ++ show (nameType x))
-        _ -> error "really not a class name"
-namesHsDecl _ = mempty
-
-namesHsDeclTS (HsTypeSig sl ns _) = ((map (,sl) ns),[])
-namesHsDeclTS _ = ([],[])
-
-namesHsConDecl c = (fromValishHsName $ hsConDeclName c,hsConDeclSrcLoc c) : case c of
-    -- HsRecDecl { hsConDeclRecArg = ra } -> concatMap (map (rtup (hsConDeclSrcLoc c)) . fst) ra
-    _ -> []
-
hunk ./src/FrontEnd/Rename.hs 795
-
hunk ./src/FrontEnd/Rename.hs 799
-
hunk ./src/FrontEnd/Representation.hs 138
-
-
hunk ./src/FrontEnd/Representation.hs 151
-
-
hunk ./src/FrontEnd/Representation.hs 182
-
hunk ./src/FrontEnd/Representation.hs 187
-
-
-
hunk ./src/FrontEnd/Representation.hs 188
---------------------------------------------------------------------------------
-
-
hunk ./src/FrontEnd/Representation.hs 201
-
---instance FromTupname HsName where
---    fromTupname (Qual (Module "Jhc.Basics") (HsIdent xs))  = fromTupname xs
---    fromTupname _ = fail "fromTupname: not Prelude"
-
---instance ToTuple HsName where
---    toTuple n = (Qual (Module "Jhc.Basics") (HsIdent $ toTuple n))
-
--- pretty printing a HsName, Module and HsIdentifier
-
---instance DocLike d => PPrint d HsName where
---   pprint (Qual mod ident)
-      -- don't print the Prelude module qualifier
---      | mod == Module "Prelude" = pprint ident
---      | otherwise               = pprint mod <> text "." <> pprint ident
---   pprint (UnQual ident)
---      = pprint ident
-
hunk ./src/FrontEnd/Representation.hs 204
---instance DocLike d => PPrint d HsIdentifier where
---   pprint (HsIdent   s) = text s
-
-
hunk ./src/FrontEnd/Tc/Main.hs 156
-tiExpr (HsCase e alts) typ = withContext (simpleMsg $ "in the case expression\n   case " ++ show e ++ " of ...") $ do
+tiExpr (HsCase e alts) typ = withContext (simpleMsg $ "in the case expression\n   case " ++ render (ppHsExp e) ++ " of ...") $ do