[web-devel] happstack code reloading

Asafe Ribeiro asafe.hai.kai at gmail.com
Sun Mar 18 03:12:48 CET 2012


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


import Happstack.Server.Plugins.Dynamic
import Happstack.Server.Plugins.Static

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