[GHC] #5929: Exciting arity warning when compiling with optimizations

GHC cvs-ghc at haskell.org
Thu Apr 26 22:25:56 CEST 2012


#5929: Exciting arity warning when compiling with optimizations
-----------------------------------------------+----------------------------
 Reporter:  passalaqua                         |          Owner:                  
     Type:  bug                                |         Status:  new             
 Priority:  normal                             |      Component:  Compiler        
  Version:  7.4.1                              |       Keywords:  Exciting arity  
       Os:  Unknown/Multiple                   |   Architecture:  Unknown/Multiple
  Failure:  Incorrect warning at compile-time  |       Testcase:                  
Blockedby:                                     |       Blocking:                  
  Related:                                     |  
-----------------------------------------------+----------------------------

Comment(by michalt):

 I've just looked at the code for arity analysis and it seems to work just
 fine.
 This doesn't seem to be a warning but a debugging message comming from a
 ```pprTrace``` whenever the fixed-point algorith for arity analysis goes
 for
 more than one iteration. I thought that ```pprTrace``` should be disabled
 by
 default, but it is defined as
 {{{
 pprTrace :: String -> SDoc -> a -> a
 -- ^ If debug output is on, show some 'SDoc' on the screen
 pprTrace str doc x
    | opt_NoDebugOutput = x
    | otherwise         = pprDebugAndThen trace str doc x
 }}}
 and
 {{{
 opt_NoDebugOutput   :: Bool
 opt_NoDebugOutput               = lookUp  (fsLit "-dno-debug-output")
 }}}
 which, as far as I can see, means that ```pprTrace``` will print something
 unless the user specifies ```-dno-debug-output```. IOW it will be enabled
 by
 default.

 The attached patch enables the ```-dno-debug-output``` if GHC is compiled
 without DEBUG. Also we could consider adding a flag to enable debug output
 (i.e.
 the opposite of ```-dno-debug-output```), such as ```-ddebug-output```.

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



More information about the Glasgow-haskell-bugs mailing list