[GHC] #14527: Warn on recursive bindings

GHC ghc-devs at haskell.org
Mon Nov 27 15:42:42 UTC 2017


#14527: Warn on recursive bindings
-------------------------------------+-------------------------------------
        Reporter:  chrisdone         |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 Just for clarification. Does

 >  This applies to let, where and top-level pattern bindings.

 Mean it applies to

 {{{
 let x = ones : x
 }}}
 and
 {{{
 let f = \n -> if n == 0 then 1 else n * f (n-1)
 }}}
 but not
 {{{
 let f n = if n == 0 then 1 else n * f (n-1)
 }}}
 right?

 (I think I like the explicit `~` on recursive value bindings.)

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


More information about the ghc-tickets mailing list