tsweb-0.1.1: An API binding Web.Spock to Database.Beam

Safe HaskellNone



These are the base wrappers around Spock's contexts and state monad. The main thing that TsWeb does is force in a Context type that is a wrapper around a Rec and a HVect. The Rec is used to store tagged URL paths, while the HVect stores contextual data for views, such as a database connection or authentication information.



data Context lts vec Source #

A container for a Rec of tagged Spock paths and a HVect of view contextual data.

The paths are built with path and friends, and are queried using getPath / showPath.

Context extras are currently populated using dbwrite and auth; probably more will be added as needed.




type TsWebStateM sessdata = WebStateM () sessdata () Source #

Wrapper around WebStateM to suppress spock's database and web_state

type TsActionCtxT lts xs sessdata a = ActionCtxT (Context lts xs) (TsWebStateM sessdata) a Source #

Wrapper around ActionCtxT to use Context and TsWebStateM

type TsSpockCtxT lts xs sessdata = SpockCtxT (Context lts xs) (TsWebStateM sessdata) Source #

Wrapper around SpockCtxT to use Context and TsWebStateM