Skip to content

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

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.

Trac metadata
Trac field Value
Version 7.0.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information