[web-devel] happstack code reloading
Asafe Ribeiro
asafe.hai.kai at gmail.com
Sun Mar 18 03:12:48 CET 2012
Hi,
Since one extra parameters was added to the plugin lambda my hmt code
does no update when I refresh the page. As my code is in hierarchical
modules , I tried the hack of changing System.Plugin.Make.build but to
no sucess. Maybe am I missing something?
{-# LANGUAGE CPP, TemplateHaskell,NoOverloadedStrings #-}
module Main where
import Control.Monad(msum)
import Happstack.Server
import Control.Monad.IO.Class(liftIO)
import qualified Page as P
import qualified Handler as H
#define DESENVOLVIMENTO
--plugins
#ifdef DESENVOLVIMENTO
import Happstack.Server.Plugins.Dynamic
#else
import Happstack.Server.Plugins.Static
#endif
main = do
dev <- initPlugins
simpleHTTP nullConf $ do decodeBody (defaultBodyPolicy "/tmp/"
106496 106496 106496)
msum [
$(withServerPart 'H.user)
dev devHandler ,
dir "book" $
$(withServerPart 'H.book) dev devHandler
}
where devHandler = (\ _ handler -> handler)
More information about the web-devel
mailing list