Skip to content
Browse files

Add -Wall to new modules, remove warnings

  • Loading branch information...
1 parent 34514ff commit da67a445b787bfcd39ed4f3d715b876070fd9c80 @kfish committed
Showing with 9 additions and 4 deletions.
  1. +2 −3 src/Children.hs
  2. +7 −1 src/main.hs
View
5 src/Children.hs
@@ -1,7 +1,8 @@
+{-# OPTIONS -Wall #-}
+
module Children where
import Control.Concurrent
-import Control.Concurrent.MVar
import Control.Exception (finally)
import System.IO.Unsafe (unsafePerformIO)
@@ -25,5 +26,3 @@ forkChild io = do
childs <- takeMVar children
putMVar children (mvar:childs)
forkIO (io `finally` putMVar mvar ())
-
-later x y = y >> x
View
8 src/main.hs
@@ -1,3 +1,5 @@
+{-# OPTIONS -Wall #-}
+
module Main where
import Control.Concurrent.Chan
@@ -6,11 +8,15 @@ import Control.Monad (when)
import Children
import GUI
+main :: IO ()
main = later waitForChildren $ do
chan <- newChan
- forkChild (guiMain chan)
+ _ <- forkChild (guiMain chan)
monitor chan
+ where
+ later x y = y >> x
+monitor :: Chan String -> IO()
monitor chan = do
x <- readChan chan
putStrLn $ "Received message: " ++ x

0 comments on commit da67a44

Please sign in to comment.
Something went wrong with that request. Please try again.