Update DevelMain

This commit is contained in:
Chris Done 2016-06-08 14:19:46 +02:00
parent 4107980263
commit 34d23b6e47

View File

@ -16,13 +16,11 @@ import Data.IORef
import Foreign.Store import Foreign.Store
import Network.Wai.Handler.Warp import Network.Wai.Handler.Warp
import Yesod import Yesod
import Yesod.Static
-- | Start the web server. -- | Start the web server.
main :: IO (Store (IORef Application)) main :: IO (Store (IORef Application))
main = main =
do s <- static "static" do c <- newChan
c <- newChan
(settings,app) <- getApplicationDev (settings,app) <- getApplicationDev
ref <- newIORef app ref <- newIORef app
tid <- forkIO tid <- forkIO
@ -46,7 +44,6 @@ update =
do ref <- readStore store do ref <- readStore store
c <- readStore (Store 2) c <- readStore (Store 2)
writeChan c () writeChan c ()
s <- static "static" (_,app) <- getApplicationDev
(_settings,app) <- getApplicationDev
writeIORef ref app writeIORef ref app
return store return store