
#12188: Pattern variables bound by PatternGuards are not accessible in where clause -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => closed * resolution: => invalid Comment: Right now, GHC works the other way, accepting this: {{{#!hs foo :: Int -> Int foo x | should_add = x + 1 | otherwise = x - 1 where should_add = x > 0 }}} I've not checked to see whether this is specified in the Report, but my guess is that it is. I'm closing as invalid, but do reopen if I've misunderstood. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12188#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler