+ where printTypeAndContentOfNames session names = do
+ let namesSorted = sortBy compareNames names
+ tythings <- catMaybes `liftM`
+ io (mapM (GHC.lookupName session) names)
+ docs_ty <- mapM showTyThing tythings
+ terms <- mapM (io . GHC.obtainTerm session False)
+ [ id | (AnId id, Just _) <- zip tythings docs_ty]
+ docs_terms <- mapM (io . showTerm session) terms
+ printForUser $ vcat $ zipWith (\ty cts -> ty <> text " = " <> cts)
+ (catMaybes docs_ty)
+ docs_terms
+