[GHC] #7863: Verbosity level for quieter Template Haskell

GHC ghc-devs at haskell.org
Sat Sep 20 11:49:49 UTC 2014


#7863: Verbosity level for quieter Template Haskell
-------------------------------------+-------------------------------------
              Reporter:  dolio       |            Owner:  hvr
                  Type:  feature     |           Status:  new
  request                            |        Milestone:  7.10.1
              Priority:  low         |          Version:  7.6.3
             Component:  Template    |         Keywords:  linker
  Haskell                            |     Architecture:  Unknown/Multiple
            Resolution:              |       Difficulty:  Unknown
      Operating System:              |       Blocked By:
  Unknown/Multiple                   |  Related Tickets:  #5647
       Type of failure:              |
  None/Unknown                       |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by hvr):

 * owner:   => hvr


Comment:

 The actual change seems to be just a single character:

 {{{#!diff
 diff --git a/compiler/ghci/Linker.lhs b/compiler/ghci/Linker.lhs
 index 5b0251c..ecba45b 100644
 --- a/compiler/ghci/Linker.lhs
 +++ b/compiler/ghci/Linker.lhs
 @@ -1292,7 +1292,7 @@ findFile mk_file_path (dir : dirs)
  \begin{code}
  maybePutStr :: DynFlags -> String -> IO ()
  maybePutStr dflags s
 -    = when (verbosity dflags > 0) $
 +    = when (verbosity dflags > 1) $
            do let act = log_action dflags
               act dflags SevInteractive noSrcSpan defaultUserStyle (text
 s)
 }}}

 as `maybePutStr` is used for all linker-related progress logging output

 With that change, a GHCi session looks like

 {{{
 $ inplace/bin/ghc-stage2 --interactive
 GHCi, version 7.9.20140919: http://www.haskell.org/ghc/  :? for help
 λ:2> Control.DeepSeq.rnf ()
 ()
 it :: ()
 λ:3>
 }}}

 for comparison, here's what this looks like in GHC 7.8.3:

 {{{
 GHCi, version 7.8.3: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 λ:2> Control.DeepSeq.rnf ()
 Loading package array-0.5.0.0 ... linking ... done.
 Loading package deepseq-1.3.0.2 ... linking ... done.
 ()
 it :: ()
 λ:3>
 }}}

 If we want it that way, I'll go forward and adapt any testsuite wobbles
 this may have caused.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7863#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list