Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (27 sloc) 0.911 kB
{-# LANGUAGE PackageImports #-}
import "neoprene" Application (getApplicationDev)
import Network.Wai.Handler.Warp
(runSettings, defaultSettings, settingsPort)
import Control.Concurrent (forkIO)
import System.Directory (doesFileExist, removeFile)
import System.Exit (exitSuccess)
--import Control.Concurrent (threadDelay)
import System.Process (system)
main :: IO ()
main = do
putStrLn "Starting devel application"
(port, app) <- getApplicationDev
forkIO $ runSettings defaultSettings
{ settingsPort = port
} app
loop :: IO ()
loop = do
-- `threadDelay` doesn't work properly and causes `yesod devel` to use 100% CPU
-- this is a known issue:
--threadDelay 100000
system "sleep 1"
e <- doesFileExist "dist/devel-terminate"
if e then terminateDevel else loop
terminateDevel :: IO ()
terminateDevel = exitSuccess
Jump to Line
Something went wrong with that request. Please try again.