[GHC] #16171: "ApplicativeDo" disables -Wunused-do-binds?

GHC ghc-devs at haskell.org
Sat Jan 12 04:04:17 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
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 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
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16171>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list