@@ -43,25 +43,25 @@ runNoWatch port modu func extras = do
43runQuit :: Int -> ModuleName -> FunctionName -> (FilePath -> IO [FilePath])
43runQuit :: Int -> ModuleName -> FunctionName -> (FilePath -> IO [FilePath])
45runQuit port modu func extras = do
45runQuit port modu func extras = do
46− ev <- newEmptyMVar
46+ sig <- newEmptyMVar
47− _ <- forkIO $ run port modu func extras (Just ev)
47+ _ <- forkIO $ run port modu func extras (Just sig)
50− go ev = do
50+ go sig = do
51 x <- getLine
51 x <- getLine
53 'q':_ -> putStrLn "Quitting, goodbye!"
53 'q':_ -> putStrLn "Quitting, goodbye!"
54 'r':_ -> do
54 'r':_ -> do
55 putStrLn "Forcing reinterpretation"
55 putStrLn "Forcing reinterpretation"
56− _ <- tryPutMVar ev ()
56+ _ <- tryPutMVar sig ()
58− _ -> go ev
58+ _ -> go sig
60run :: Int -> ModuleName -> FunctionName -> (FilePath -> IO [FilePath]) -> Maybe (MVar ())
60run :: Int -> ModuleName -> FunctionName -> (FilePath -> IO [FilePath]) -> Maybe (MVar ())
62−run port modu func extras mev = do
62+run port modu func extras msig = do
63 ah <- initAppHolder
63 ah <- initAppHolder
64− _ <- forkIO $ fillApp modu func extras ah mev
64+ _ <- forkIO $ fillApp modu func extras ah msig
65 Warp.run port $ toApp ah
65 Warp.run port $ toApp ah
@@ -94,11 +94,11 @@ constSE = const
95fillApp :: String -> String
95fillApp :: String -> String
96 -> (FilePath -> IO [FilePath]) -> AppHolder -> Maybe (MVar ()) -> IO ()
96 -> (FilePath -> IO [FilePath]) -> AppHolder -> Maybe (MVar ()) -> IO ()
97−fillApp modu func dirs ah mev =
97+fillApp modu func dirs ah msig =
98 go Nothing []
98 go Nothing []
100 go prevError prevFiles = do
100 go prevError prevFiles = do
101− forceReload <- maybe (return False) (fmap isJust . tryTakeMVar) mev
101+ forceReload <- maybe (return False) (fmap isJust . tryTakeMVar) msig
102 toReload <-
102 toReload <-
103 if forceReload || null prevFiles
103 if forceReload || null prevFiles
104 then return True
104 then return True