
#8325: Pattern guards in anonymous functions -------------------------------------+------------------------------------- Reporter: mcollis | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 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 rwbarton): One tricky case would be trying to write something like {{{ f z | odd z = \x y | x > y -> x | otherwise -> y | even z = \x y -> 0 }}} The `| even z` guard has to be attached to `f` because it is followed by `=`, but that requires some look-ahead. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8325#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler