From 0ea1e14f473dabe75f9e355dc7d2debeffb0fafc Mon Sep 17 00:00:00 2001 From: davve Date: Wed, 17 Jan 2007 21:40:26 +0000 Subject: Add trace_ppr to GHCUtils --- src/GHCUtils.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/GHCUtils.hs') diff --git a/src/GHCUtils.hs b/src/GHCUtils.hs index 01bc89f4..e6820c66 100644 --- a/src/GHCUtils.hs +++ b/src/GHCUtils.hs @@ -1,7 +1,12 @@ module GHCUtils where +import Debug.Trace + +import GHC import HsSyn import SrcLoc +import HscTypes +import Outputable getMainDeclBinder :: HsDecl name -> Maybe name getMainDeclBinder (TyClD d) = Just (tcdName d) @@ -13,3 +18,8 @@ getMainDeclBinder (SigD d) = sigNameNoLoc d getMainDeclBinder (ForD (ForeignImport name _ _)) = Just (unLoc name) getMainDeclBinder (ForD (ForeignExport name _ _)) = Nothing getMainDeclBinder _ = Nothing + +modInfoName = moduleName . mi_module . minf_iface +modInfoMod = mi_module . minf_iface + +trace_ppr x y = trace (showSDoc (ppr x)) y -- cgit v1.2.3