[GHC] #8022: Outdated documentation for the -fwarn-lazy-unlifted-bindings warning

GHC ghc-devs at haskell.org
Tue Aug 27 15:01:19 UTC 2013


#8022: Outdated documentation for the -fwarn-lazy-unlifted-bindings warning
-------------------------------------+------------------------------------
        Reporter:  asr               |            Owner:  thoughtpolice
            Type:  bug               |           Status:  new
        Priority:  highest           |        Milestone:  7.8.1
       Component:  Documentation     |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------
Changes (by simonpj):

 * owner:   => thoughtpolice
 * priority:  normal => highest
 * milestone:   => 7.8.1


Comment:

 OK. `-fwarn-lazy-unlifted-bindings` is on by default
 ([http://www.haskell.org/ghc/docs/latest/html/users_guide/options-
 sanity.html documentation here]), with a message saying
 {{{
 Foo.hs:6:11: Warning:
   Pattern bindings containing unlifted types should use an outermost bang
 pattern:
 }}}
 I propose:

  * To make `-fwarn-lazy-unlifted-bindings` into a no-op (that says "I do
 nothing"), and remove it altogether in 7.10.

  * To remove `-fwarn-lazy-unlifted-bindings` from the "on by default set"

  * To make lazy unlifted bindings an outright error.  So GHC would reject
 {{{
   f x = let I# y = x in ....blah....
 }}}
   (Currently this elicits the warning, because y has type Int# in a lazy-
 looking binding.)

  * Fix the documentation to match.

 It would be possible (and easy to implement) to have a new language
 extension that allows such bindings, treating them as strict, which is
 what happens now.  But given the long-standing warning and the easy fix,
 I'm disinclined to add this extra faff and documentation stuff.

 Any objections?  Let's do this for 7.8.

 Simon

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




More information about the ghc-tickets mailing list