
#8671: Rebindable syntax creates bogus warning -------------------------------------------------+------------------------- Reporter: thomaseding | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: Incorrect warning at | Unknown/Multiple compile-time | Difficulty: Test Case: | Unknown Blocking: | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Comment (by thomaseding): Just some initial thoughts that may or may not be useful -- concerning conditionally suppressing the warning based on what the syntax is rebound to... ---- Consider {{{ blah = do x -- suppose that GHC issues the warning for this (whether the warning is correct or not) y }}} Translates to {{{ blah = x >> y }}} Before issuing the warning, consider translating the code to {{{ blah = x >>= (\_ -> y) }}} If this compiles, then issue the warning. Otherwise do not. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8671#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler