
#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 chrisdone): Right, I was aiming for {{{ones = 1 : ones}}} to be a warning. How about we rephrase it as "function-like": * The RHS is not a function-like: either a lambda or a lambda-case. (If the RHS is a literal then by-definition it's not recursive and wouldn't trigger the warning, I think.) With an ad-hoc bit like that, I'm more convinced that this could be practical. I'll consider making a proposal for it. A draft implementation could be run against Stackage to see how many false-positives it flags up. Here and reddit provided enough concerns -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14527#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler