{ hunk ./HAppS.cabal 7 -Build-Depends: base, HaXml >= 1.13 && < 1.14, parsec, mtl, network, stm, template-haskell, regex-compat, hslogger >= 1.0.2, generic-xml + +--6.6.1: [_$_] +Build-Depends: base, HaXml >= 1.13 && < 1.14, parsec, mtl, network, stm, template-haskell, hslogger, generic-xml, regex-compat + +-- 6.7: [_$_] +-- Build-Depends: base, HaXml >= 1.13 && < 1.14, parsec, mtl, network, stm, template-haskell, hslogger, random, containers, old-time, old-locale, bytestring, array, directory, regex-compat, HaXml, process, unix + hunk ./src/HAppS/Examples/HTTP1.hs 8 -main = mainHTTP (httpH ".") +main = do putStrLn "happs started" + mainHTTP (httpH ".") hunk ./src/HAppS/Examples/HTTP1.hs 68 + + , h ["iohandler"] GET $ ioReadFileHandler + , h ["statehandler"] GET $ stateHandler + --, h ["ioandstatehandler"] GET $ ioAndStateHandler hunk ./src/HAppS/Examples/HTTP1.hs 74 +-- displays contents of HAPPS.hs in current directory +ioReadFileHandler = iohandler $ readFile "./HAppS.hs" [_$_] + +-- displays incremented state counter +stateHandler = ok $ \() () -> [_$_] + modify (+(1::Int)) >> get >>= respond . show + +-- should combine effect of iohandler with statehandler +-- specifically, should display contents of HAppS.hs, and under that an incremented state handler +-- is this possible +ioAndStateHandler = undefined undefined + hunk ./src/HAppS/Examples/HTTP1.hs 121 + +iohandler ioaction = \() () -> respond $ do + res <- ioaction + --(MySt val) <- get + sresult 200 $ "completed io action, result: " ++ res + hunk ./src/HAppS/Protocols/SimpleHTTP2.hs 100 -debugFilter = multi [ModResp (return (\res -> logM "HAppS.Protocols.SimpleHTTP2" INFO (show res) >> return res))] +debugFilter = multi [ModResp (return (\res -> logM "HAppS.Protocols.SimpleHTTP2" WARNING (show res) >> return res))] hunk ./src/HAppS/Protocols/SimpleHTTP2.hs 189 - }