[GHC] #16171: "ApplicativeDo" disables -Wunused-do-binds?
GHC
ghc-devs at haskell.org
Sat Jan 12 14:45:11 UTC 2019
#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
More information about the ghc-tickets
mailing list