Ticket #5125 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

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 Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

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

Changed 2 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..

Changed 2 years ago by ezyang

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

Changed 2 years ago by simonmar

  • owner set to simonpj
  • priority changed from normal to high
  • milestone set to 7.2.1

Changed 2 years ago by simonpj

  • status changed from new to closed
  • resolution set to fixed

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.