Skip to content

"ApplicativeDo" disables -Wunused-do-binds?

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
Edited by Erik Schnetter
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information