
#16171: "ApplicativeDo" disables -Wunused-do-binds? -------------------------------------+------------------------------------- Reporter: eschnett | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.2 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: | -------------------------------------+------------------------------------- Description changed by eschnett: Old description:
In the code below, the return value of {{{forkIO}}} is ignored. The compiler fails to not warn about this. When I disable the {{{ApplicativeDo}}} extension, the warning appears as expected.
{{{ {-# OPTIONS_GHC -Wall #-} {-# LANGUAGE ApplicativeDo #-}
module Example (main) where
import Control.Concurrent
main :: IO () main = do x <- return () forkIO (putStrLn "hello") putStrLn $ "world" ++ show x }}}
New description: In the code below, the return value of {{{forkIO}}} is ignored. The compiler does not warn about this. When I disable the {{{ApplicativeDo}}} extension, the warning appears as expected. {{{ {-# OPTIONS_GHC -Wall #-} {-# LANGUAGE ApplicativeDo #-} module Example (main) where import Control.Concurrent main :: IO () main = do x <- return () forkIO (putStrLn "hello") putStrLn $ "world" ++ show x }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16171#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler