From 2ca6e2ee08470480dc6ede14377cfb6c05a08d68 Mon Sep 17 00:00:00 2001 From: Tim Dysinger Date: Thu, 27 Sep 2012 14:31:44 -1000 Subject: [PATCH 1/3] add dynflags --- Info.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Info.hs b/Info.hs index 618bb3c..456375b 100644 --- a/Info.hs +++ b/Info.hs @@ -118,7 +118,7 @@ infoThing str = do mb_stuffs <- mapM getInfo names let filtered = filterOutChildren (\(t,_f,_i) -> t) (catMaybes mb_stuffs) unqual <- getPrintUnqual - return $ showSDocForUser unqual $ vcat (intersperse (text "") $ map (pprInfo False) filtered) + return $ showSDocForUser tracingDynFlags unqual $ vcat (intersperse (text "") $ map (pprInfo False) filtered) filterOutChildren :: (a -> TyThing) -> [a] -> [a] filterOutChildren get_thing xs @@ -154,7 +154,7 @@ inModuleContext opt fileName modstr action errmsg = doif setContextFromTarget action setTargetBuffer = do modgraph <- depanal [mkModuleName modstr] True - let imports = concatMap (map (showSDoc . ppr . unLoc)) $ + let imports = concatMap (map ((showSDoc tracingDynFlags) . ppr . unLoc)) $ map ms_imps modgraph ++ map ms_srcimps modgraph moddef = "module " ++ sanitize modstr ++ " where" header = moddef : imports From 24f1613e915c0beae2121fb2efbda7164a70489e Mon Sep 17 00:00:00 2001 From: Tim Dysinger Date: Thu, 27 Sep 2012 14:32:18 -1000 Subject: [PATCH 2/3] Use time package so we're ghc 7.6 compatible --- Info.hs | 3 ++- ghc-mod.cabal | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Info.hs b/Info.hs index 456375b..d65fd06 100644 --- a/Info.hs +++ b/Info.hs @@ -10,6 +10,7 @@ import Data.Generics import Data.List import Data.Maybe import Data.Ord as O +import Data.Time.Clock import DynFlags (tracingDynFlags) import Desugar import GHC @@ -159,7 +160,7 @@ inModuleContext opt fileName modstr action errmsg = moddef = "module " ++ sanitize modstr ++ " where" header = moddef : imports importsBuf <- Gap.toStringBuffer header - clkTime <- Gap.liftIO getClockTime + clkTime <- Gap.liftIO getCurrentTime setTargets [Target (TargetModule $ mkModuleName modstr) True (Just (importsBuf, clkTime))] doif m t = m >>= \ok -> if ok then t else goNext sanitize = fromMaybe "SomeModule" . listToMaybe . words diff --git a/ghc-mod.cabal b/ghc-mod.cabal index cf6ef8c..20b77d8 100644 --- a/ghc-mod.cabal +++ b/ghc-mod.cabal @@ -53,6 +53,7 @@ Executable ghc-mod , hlint >= 1.7.1 , io-choice , old-time + , time , process , regex-posix , syb From b86cc972971ddaef5a5f24c8611a276f0138d5be Mon Sep 17 00:00:00 2001 From: Tim Dysinger Date: Thu, 27 Sep 2012 14:32:41 -1000 Subject: [PATCH 3/3] add ignore entry --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b7a81a5..a113d88 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ elisp/*.elc # Where do these files come from? They're not readable. # For instance, .#Help.page # .#* +cabal-dev