MFlow 0.2.0.7 → 0.2.0.8
raw patch · 5 files changed
+14/−12 lines, 5 files
Files
- MFlow.cabal +5/−6
- src/MFlow.hs +6/−3
- src/MFlow/Cookies.hs +1/−1
- src/MFlow/Forms.hs +1/−1
- src/MFlow/Wai.hs +1/−1
MFlow.cabal view
@@ -1,5 +1,5 @@ name: MFlow-version: 0.2.0.7+version: 0.2.0.8 cabal-version: >=1.6 build-type: Simple license: BSD3@@ -7,13 +7,12 @@ maintainer: agocorona@gmail.com stability: experimental Bug-reports: https://github.com/agocorona/MFlow/issues-synopsis: Web app server for stateful processes with safe, composable user interfaces.-description: A Web framework with some unique features thanks to the power of the Haskell language.- MFlow run stateful server processes; All the flow of requests and responses are coded by the programmer in a single function.+synopsis: continuation-based Web framework without continuations.+description: MFlow run stateful server processes; All the flow of requests and responses are coded by the programmer in a single function. Allthoug single request-response flows and callbacks are possible. Therefore, the code is more understandable. It is not continuation based. It uses a log for thread state persistence and backtracking forall- handling the back button. Because that the persistent state is small and can be synchronized. So- potentially that makes the MFlow architecture scalable+ handling the back button. Because the serialized state is small and can be synchronized,+ potentially that makes the MFlow architecture scalable. . These processes are stopped and restarted by the application server on demand, including its execution state. Therefore session management
src/MFlow.hs view
@@ -45,7 +45,8 @@ {-# LANGUAGE DeriveDataTypeable, UndecidableInstances- ,ExistentialQuantification, MultiParamTypeClasses+ ,ExistentialQuantification+ ,MultiParamTypeClasses ,FunctionalDependencies ,TypeSynonymInstances ,FlexibleInstances@@ -299,8 +300,10 @@ transient f= unsafeIOtoWF . f -- WF(\s -> f t>>= \x-> return (s, x) ) -_messageFlows :: MVar (M.Map String Flow) -_messageFlows= unsafePerformIO $ newMVar M.empty +_messageFlows :: MVar (WorkflowList IO Token ()) -- MVar (M.Map String (Token -> Workflow IO ())) +_messageFlows= unsafePerformIO $ newMVar emptyFList+ where+ emptyFList= M.empty :: WorkflowList IO Token () -- | add a list of flows to be scheduled. Each entry in the list is a pair @(path, flow)@ addMessageFlows wfs= modifyMVar_ _messageFlows(\ms -> return $ M.union ms (M.fromList $ map flt wfs))
src/MFlow/Cookies.hs view
@@ -187,7 +187,7 @@ --extra :: Parser Char -extra = satisfy (`Prelude.elem` "!*'(),/") +extra = satisfy (`Prelude.elem` "!*'(),/\"") -- --safe :: Parser Char safe = satisfy (`Prelude.elem` "$-_.")
src/MFlow/Forms.hs view
@@ -781,7 +781,7 @@ st <- get let t = mfToken st u = tuser t- if u== uname then return () else do+ if u == uname then return () else do let t'= t{tuser= uname} moveState (twfname t) t t' put st{mfToken= t'}
src/MFlow/Wai.hs view
@@ -109,7 +109,7 @@ Right GET -> let tail1 s | s==SB.empty =s tail1 xs= SB.tail xs - in return . urlDecode $ SB.unpack . tail1 $ rawQueryString req1 -- !> (SB.unpack $ rawQueryString req1) + in return . urlDecode $ SB.unpack . tail1 $ rawQueryString req1 -- !> (SB.unpack $ rawQueryString req1) x -> return [] let req = case retcookies of [] -> req1{requestHeaders= mkParams (input ++ cookies) ++ requestHeaders req1} -- !> "REQ"