
#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 simonpj):
So I'm afraid it's less straight-forward than I hoped.
It's only a warning so it's ok to have ad-hoc (but still well specified) conditions. For example: you get a warning if * The binding is recursive (or part of a recursive group) * It is a pattern or simple variable binding; that is there are no argument on the LHS * The LHS does not have a top-level tilde * The RHS is not a syntactic value. Then define syntactic values to be: literal, constructor application, lambda, `\case`, etc. (This is the slightly ad-hoc bit.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14527#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler