w      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv NonewwwNone =BHKM&xyz{|}~#xyz{|}~xyz{~}|None $=HKMeRun a raw spock server on a defined port. If you don't need a custom base monad you can just supply  as lift function.xNone$HM#Get the original Wai Request object Read a header Read a cookieGet the raw request bodyParse the request body as jsonFParse the request body as json and fails with 500 status code on errorGet uploaded filesGet all request paramsnRead a request param. Spock looks in route captures first, then in POST variables and at last in GET variablesLike ., but outputs an error when a param is missing Set a response status!9Set a response header. Overwrites already defined headers"AAbort the current action and jump the next one matching the route#Redirect to a given url$1Set a cookie living for a given number of seconds%%Set a cookie living until a specific &Send a  ByteString$ as response body. Provide your own  Content-Type' Send a lazy  ByteString$ as response body. Provide your own  Content-Type(?Send text as a response body. Content-Type will be "text/plain")?Send a text as response body. Content-Type will be "text/plain"*Send a file as response+>Send json as response. Content-Type will be "application/json",=Send blaze html as response. Content-Type will be "text/html"-tBasic authentification provide a title for the prompt and a function to validate user and password. Usage example: get "/my-secret-page" $ requireBasicAuth "Secret Page" (\user pass -> return (user == "admin" && pass == "1234")) $ do html "This is top secret content. Login using that secret code I provided ;-)" !"#$%&'()*+,- !"#$%&'()*+,- !"#$%&'()*+,-None$.Run a digestive functors form. form name..None &6:=BHKM 0CSafeActions are actions that need to be protected from csrf attacks1/The body of the safe action. Either GET or POST6Give you access to a database connectin from the connection pool. The connection is released back to the pool once the function terminates.7RRead the application's state. If you wish to have mutable state, you could use a  from the STM packge.Get the session manager9%Configuration for the session manager?jYou can feed Spock with either a connection pool, or instructions on how to build a connection pool. See BBMThe ConnBuilder instructs Spock how to create or close a database connection.GfIf Spock should take care of connection pooling, you need to configure it depending on what you need.L{The SpockAction is the monad of all route-actions. You have access to the database, session and state of your application.AInside the SpockAllM monad, you may define routes and middleware.H/0123456789:;<=>?@ABCDEFGHIJKLB/0123456789:;<=>?@ABCDEFGHIJKL /0123456789:;<=>?A@BCDEFGHIJKL None24=BKMRead the heart of Spock. This is useful if you want to construct your own monads that work with runQuery and getState using "runSpockIO"NWRun an action inside of Spocks core monad. This allows you to use runQuery and getState MNMN MN None$03HM None$=HKMRun a spock application using the warp server, a given db storageLayer and an initial state. Spock works with database libraries that already implement connection pooling and with those that don't come with it out of the box. For more see the ? type.None !"$(3BHMQRun a spock application using the warp server, a given db storageLayer and an initial state. Spock works with database libraries that already implement connection pooling and with those that don't come with it out of the box. For more see the ? type.R8Run a raw spock application with custom underlying monadS(Convert a Spock-App to a wai-applicationT6Specify an action that will be run when the HTTP verb  and the given route matchU6Specify an action that will be run when the HTTP verb  and the given route matchV6Specify an action that will be run when the HTTP verb  and the given route matchW6Specify an action that will be run when the HTTP verb  and the given route matchX6Specify an action that will be run when the HTTP verb  and the given route matchY6Specify an action that will be run when the HTTP verb  and the given route matchZMSpecify an action that will be run when a HTTP verb and the given route match[%Define a subcomponent. Usage example: subcomponent "site" $ do get "home" homeHandler get ("misc" <> var) $ -- ... subcomponent "admin" $ do get "home" adminHomeHandler The request "site6home" will be routed to homeHandler and the request "admin(home" will be routed to adminHomeHandler\Hook wai middleware into Spock]Write to the current session. Note that all data is stored on the server. The user only reciedes a sessionId to be identified.^Modify the stored session_Read the stored session`nGlobally delete all existing sessions. This is useful for example if you want to require all users to reloginanWire up a safe action: Safe actions are actions that are protected from csrf attacks. Here's a usage example: newtype DeleteUser = DeleteUser Int deriving (Hashable, Typeable, Eq) instance SafeAction Connection () () DeleteUser where runSafeAction (DeleteUser i) = do runQuery $ deleteUserFromDb i redirect "/user-list" get "/user-details/:userId" $ do userId <- param' "userId" deleteUrl <- safeActionPath (DeleteUser userId) html $ "Click <a href='" <> deleteUrl <> "'>here</a> to delete user!"CNote that safeActions currently only support GET and POST requests.OPQRSTUVWXYZ[\]^_`ab  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abQPLROS  [TUVWXYZ  !#"$%&'()*+,\?A@BCDEFGHIJK2345679:;<=>_]^`-01a.MN/8OPQRSTUVWXYZ[\]^_`aNone !"$3BHMeRun a spock application using the warp server, a given db storageLayer and an initial state. Spock works with database libraries that already implement connection pooling and with those that don't come with it out of the box. For more see the ? type.f8Run a raw spock application with custom underlying monadg(Convert a Spock-App to a wai-applicationh&Combine two route components safely "foo"  # " bar" ===> "foo bar" "foo"  # "bar" ===> "foo bar" "foo  # " bar" ===> "foo/bar"i6Specify an action that will be run when the HTTP verb  and the given route matchj6Specify an action that will be run when the HTTP verb  and the given route matchk6Specify an action that will be run when the HTTP verb  and the given route matchl6Specify an action that will be run when the HTTP verb  and the given route matchm6Specify an action that will be run when the HTTP verb  and the given route matchn6Specify an action that will be run when the HTTP verb  and the given route matchoMSpecify an action that will be run when a HTTP verb and the given route matchp%Define a subcomponent. Usage example: subcomponent "/site" $ do get "/home" homeHandler get "/misc/:param" $ -- ... subcomponent "/admin" $ do get "/home" adminHomeHandler The request site4home will be routed to homeHandler and the request admin'home will be routed to adminHomeHandlerqHook wai middleware into SpockrWrite to the current session. Note that all data is stored on the server. The user only reciedes a sessionId to be identified.sModify the stored sessiontRead the stored sessionunGlobally delete all existing sessions. This is useful for example if you want to require all users to reloginvnWire up a safe action: Safe actions are actions that are protected from csrf attacks. Here's a usage example: newtype DeleteUser = DeleteUser Int deriving (Hashable, Typeable, Eq) instance SafeAction Connection () () DeleteUser where runSafeAction (DeleteUser i) = do runQuery $ deleteUserFromDb i redirect "/user-list" get "/user-details/:userId" $ do userId <- param' "userId" deleteUrl <- safeActionPath (DeleteUser userId) html $ "Click <a href='" <> deleteUrl <> "'>here</a> to delete user!"CNote that safeActions currently only support GET and POST requests.bcdefghijklmnopqrstuv^  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNbcdefghijklmnopqrstuv^edLfcgbhpijklmno  !#"$%&'()*+,q?A@BCDEFGHIJK2345679:;<=>trsu-01v.MN/8bcdefghijklmnopqrstuv           !!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHHIJKLMNOPPQRSTTUVWX Y Z[\]^_`abcdefghijklmn[\]^_o`abcdefghijklmpq rstuvwxxyz{|}~ghf>G [n[ Spock-0.7.1.0Web.Spock.SafeWeb.Spock.SimpleWeb.Spock.Internal.UtilWeb.Spock.Internal.WireWeb.Spock.Internal.CoreWeb.Spock.Internal.CoreActionWeb.Spock.Internal.DigestiveWeb.Spock.Internal.TypesWeb.Spock.Internal.Monad!Web.Spock.Internal.SessionManagerWeb.Spock.Internal.Wrapperhttp-types-0.8.5Network.HTTP.Types.MethodGETPOSTHEADPUTDELETETRACECONNECTOPTIONSPATCH StdMethodreroute-0.2.0.0Web.Routing.SafeRouting renderRouterootstaticvarPathActionT UploadedFileuf_nameuf_contentTypeuf_tempLocationrequestheadercookiebodyjsonBody jsonBody'filesparamsparamparam' setStatus setHeaderjumpNextredirect setCookie setCookie'bytes lazyBytestexthtmlfilejsonblazerequireBasicAuthrunForm WebStateM SafeAction runSafeActionHasSpock SpockConn SpockState SpockSessionrunQuerygetStateWebState SessionCfg sc_cookieName sc_sessionTTLsc_sessionIdEntropysc_emptySession PoolOrConnPCConnPCPool ConnBuilder cb_createConncb_destroyConncb_poolConfigurationPoolCfg pc_stripespc_resPerStripepc_keepOpenTime SpockAction getSpockHeart runSpockIOSpockTSpockMspockspockTspockAppgetpostheadputdeletepatch hookRoute subcomponent middleware writeSession modifySession readSessionclearAllSessionssafeActionPath SpockRoute<#> mapReqHeaders SpockAllT runActionTActionInterupt ActionDone ActionError ActionTryNextActionRedirect ResponseStaters_responseHeaders rs_statusrs_responseBody ResponseBodyResponseRedirect ResponseLBS ResponseFile RequestInfo ri_request ri_paramsri_queryParamsri_filesrespStateToResponse errorResponsenotFound invalidReq serverErrorbuildApp$fMonadTransActionT$fErrorActionInterupt$fHashableStdMethod spockAllTbaseGHC.BaseidWeb.Routing.AbstractRouter time-1.4.2Data.Time.Clock.UTCUTCTime GHC.Conc.SyncTVar getSessMgr SpockAllMSessionManagersm_readSessionsm_writeSessionsm_modifySessionsm_clearAllSessions sm_middlewaresm_addSafeActionsm_lookupSafeActionsm_removeSafeAction UserSessionsSessionsess_idsess_validUntil sess_datasess_safeActions SessionId runWebStateMSafeActionHashSafeActionStore sas_forward sas_reversePackedSafeActionunpackSafeAction web_dbConnweb_sessionMgr web_stateWStMunWStM $fShowSessionTFCo:R:StMWebStateMa$fMonadBaseControlIOWebStateM$fMonadBaseIOWebStateM$fEqPackedSafeAction$fHashablePackedSafeActionwebM runQueryImpl getStateImplgetSessMgrImpl$fPathPieceUTCTime$fPathPieceByteString$fHasSpockWebStateM $fHasSpocktcreateSessionManagermodifySessionBasereadSessionBaseaddSafeActionImpllookupSafeActionImplremoveSafeActionImplreadSessionImplwriteSessionImplmodifySessionImplsessionMiddlewarenewSessionImplloadSessionImpldeleteSessionImplclearAllSessionsImplhousekeepSessions createSession randomHashspockAll runSpockThookSafeActions$fMonadTransSpockT _unSpockRoute