Opened 8 months ago

Last modified 8 months ago

#16171 new bug

"ApplicativeDo" disables -Wunused-do-binds?

Reported by: eschnett Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.6.2
Keywords: ApplicativeDo Cc:
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 (last modified by eschnett)

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

Change History (2)

comment:1 Changed 8 months ago by eschnett

Description: modified (diff)

comment:2 Changed 8 months ago by RyanGlScott

Keywords: ApplicativeDo added
Note: See TracTickets for help on using tickets.