Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : sdoc
http://hackage.haskell.org/trac/ghc/changeset/dccf55c8192d8fd5a84b5e30c636b691d1c79dad >--------------------------------------------------------------- commit dccf55c8192d8fd5a84b5e30c636b691d1c79dad Author: Ian Lynagh <[email protected]> Date: Wed May 25 15:47:24 2011 +0100 More DynFlags + SDoc >--------------------------------------------------------------- compiler/utils/Outputable.lhs | 6 +++--- ghc/GhciMonad.hs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs index 162c253..c563aa5 100644 --- a/compiler/utils/Outputable.lhs +++ b/compiler/utils/Outputable.lhs @@ -352,10 +352,10 @@ printForUser dflags handle unqual doc = Pretty.printDoc PageMode handle (runSDoc doc (initSDocContext' dflags (mkUserStyle unqual AllTheWay))) -printForUserPartWay :: Handle -> Int -> PrintUnqualified -> SDoc -> IO () -printForUserPartWay handle d unqual doc +printForUserPartWay :: DynFlags -> Handle -> Int -> PrintUnqualified -> SDoc -> IO () +printForUserPartWay dflags handle d unqual doc = Pretty.printDoc PageMode handle - (runSDoc doc (initSDocContext (mkUserStyle unqual (PartWay d)))) + (runSDoc doc (initSDocContext' dflags (mkUserStyle unqual (PartWay d)))) -- printForC, printForAsm do what they sound like printForC :: Handle -> SDoc -> IO () diff --git a/ghc/GhciMonad.hs b/ghc/GhciMonad.hs index 06ef411..90797cb 100644 --- a/ghc/GhciMonad.hs +++ b/ghc/GhciMonad.hs @@ -245,7 +245,8 @@ printForUser doc = do printForUserPartWay :: SDoc -> GHCi () printForUserPartWay doc = do unqual <- GHC.getPrintUnqual - liftIO $ Outputable.printForUserPartWay stdout opt_PprUserLength unqual doc + dflags <- getSessionDynFlags + liftIO $ Outputable.printForUserPartWay dflags stdout opt_PprUserLength unqual doc runStmt :: String -> GHC.SingleStep -> GHCi GHC.RunResult runStmt expr step = do _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
