Commit df34ee6d authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Pass DynFlags down to printForUser

parent 9d246714
......@@ -1392,9 +1392,10 @@ printMinimalImports :: [ImportDeclUsage] -> RnM ()
printMinimalImports imports_w_usage
= do { imports' <- mapM mk_minimal imports_w_usage
; this_mod <- getModule
; dflags <- getDynFlags
; liftIO $
do { h <- openFile (mkFilename this_mod) WriteMode
; printForUser h neverQualify (vcat (map ppr imports')) }
; printForUser dflags h neverQualify (vcat (map ppr imports')) }
-- The neverQualify is important. We are printing Names
-- but they are in the context of an 'import' decl, and
-- we never qualify things inside there
......
......@@ -328,8 +328,8 @@ hPrintDump _ h doc = do
where
better_doc = doc $$ blankLine
printForUser :: Handle -> PrintUnqualified -> SDoc -> IO ()
printForUser handle unqual doc
printForUser :: DynFlags -> Handle -> PrintUnqualified -> SDoc -> IO ()
printForUser _ handle unqual doc
= Pretty.printDoc PageMode handle
(runSDoc doc (initSDocContext (mkUserStyle unqual AllTheWay)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment