[GHC] #9207: Detect obvious cases of infinite recursion.

GHC ghc-devs at haskell.org
Sun Jun 15 19:15:49 UTC 2014


#9207: Detect obvious cases of infinite recursion.
------------------------------------+--------------------------------------
        Reporter:  mrugiero         |            Owner:
            Type:  feature request  |           Status:  new
        Priority:  normal           |        Milestone:
       Component:  Compiler         |          Version:  7.8.2
      Resolution:                   |         Keywords:  infinite recursion
Operating System:                   |     Architecture:  Unknown/Multiple
  Unknown/Multiple                  |       Difficulty:  Unknown
 Type of failure:  None/Unknown     |       Blocked By:
       Test Case:                   |  Related Tickets:
        Blocking:                   |
------------------------------------+--------------------------------------

Comment (by j80JjBjVNRMajmA):

 In a lazy language, writing and using infinite recursions is a feature!
 There is no way, unintentional infinite recursion could be captured by the
 compiler. Take a look at the perfectly good and useful function `repeat`:

 {{{
 repeat :: a -> [a]
 repeat x = x : repeat x
 }}}

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


More information about the ghc-tickets mailing list