Opened 9 years ago

Closed 9 years ago

#5125 closed bug (fixed)

SpecConstr messages should be reworded, and not be shown at standard verbosity level

Reported by: maltem Owned by: simonpj
Priority: high Milestone: 7.2.1
Component: Compiler Version: 7.0.3
Keywords: Cc: michal.terepeta@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Currently GHC displays many messages about "specialisation over constructors" that typically look like this:

SpecConstr
    Function `$wks2{v s2dJ} [lid]'
      has one call pattern, but the limit is 0
    Use -fspec-constr-count=n to set the bound
    Use -dppr-debug to see specialisations

Some things are wrong with the design of this message:

(1.) It is not apparent from the message if it is a fatal error, warning, or debug information. (End users who install the Haskell platform often think that something has gone wrong.)

(2.) It is not apparent from the message that it is comes from the specialiser, unless you have read SpecConstr.lhs.

(3.) The message is shown at standard verbosity, but it probably shouldn't.

(4.) -fspec-constr-count is referenced, but not documented.

See also #4288.

Change History (4)

comment:1 Changed 9 years ago by michalt

Cc: michal.terepeta@… added

It seems that one can easily get rid of the warning using -dno-debug-output. I'm not sure why this isn't the default..

comment:2 Changed 9 years ago by ezyang

This is probably debug information that snuck its way into a release.

comment:3 Changed 9 years ago by simonmar

Milestone: 7.2.1
Owner: set to simonpj
Priority: normalhigh

comment:4 Changed 9 years ago by simonpj

Resolution: fixed
Status: newclosed

OK I've suppressed it unless

  • You build the compile with -DDEBUG, or
  • You use -dppr-debug
commit 3664c198bbf23acce9820104c06878aa78a32a39
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Thu May 26 17:21:51 2011 +0100

    Suppress the alarming SpecConstr message for normal users (Trac #5125)
    
    This is the offending message:
      SpecConstr
          Function `$wks2{v s2dJ} [lid]'
            has one call pattern, but the limit is 0
          Use -fspec-constr-count=n to set the bound
          Use -dppr-debug to see specialisations
    
    The message isn't very good, and is for experts only. So now it
    comes out only
        if you build with -DDEBUG
        or you specify -dppr-debug at runtime

 compiler/specialise/SpecConstr.lhs |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
Note: See TracTickets for help on using tickets.