X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FGhciMonad.hs;h=30096ab3be4fa0e7032e2a6ac0d89f80b2ee45d7;hb=8bbebfe661bdc976965718a2a489515c4929a03f;hp=c92c4e0d0d3f26e3dc9ff97a0e58fe6031f3293b;hpb=17b297d97d327620ed6bfab942f8992b2446f1bf;p=ghc-hetmet.git diff --git a/compiler/ghci/GhciMonad.hs b/compiler/ghci/GhciMonad.hs index c92c4e0..30096ab 100644 --- a/compiler/ghci/GhciMonad.hs +++ b/compiler/ghci/GhciMonad.hs @@ -6,11 +6,11 @@ -- ----------------------------------------------------------------------------- -{-# OPTIONS_GHC -w #-} +{-# OPTIONS -w #-} -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and fix -- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings -- for details module GhciMonad where @@ -18,7 +18,7 @@ module GhciMonad where #include "HsVersions.h" import qualified GHC -import Outputable hiding (printForUser) +import Outputable hiding (printForUser, printForUserPartWay) import qualified Outputable import Panic hiding (showException) import Util @@ -27,6 +27,7 @@ import HscTypes import SrcLoc import Module import ObjLink +import StaticFlags import Data.Maybe import Numeric @@ -169,6 +170,12 @@ printForUser doc = do unqual <- io (GHC.getPrintUnqual session) io $ Outputable.printForUser stdout unqual doc +printForUserPartWay :: SDoc -> GHCi () +printForUserPartWay doc = do + session <- getSession + unqual <- io (GHC.getPrintUnqual session) + io $ Outputable.printForUserPartWay stdout opt_PprUserLength unqual doc + -- -------------------------------------------------------------------------- -- timing & statistics