Safe Haskell | None |
---|
- type Clck url = ClckT url (ServerPartT IO)
- type ClckPlugins = Plugins Theme (ClckT ClckURL (ServerPartT IO) Response) (ClckT ClckURL IO ()) ClckwrksConfig ClckPluginsSt
- data ClckPluginsSt
- initialClckPluginsSt :: ClckPluginsSt
- newtype ClckT url m a = ClckT {}
- type ClckForm url = Form (ClckT url (ServerPartT IO)) [Input] ClckFormError [XMLGenT (ClckT url (ServerPartT IO)) XML] ()
- type ClckFormT error m = Form m [Input] error [XMLGenT m XML] ()
- data ClckFormError
- = ClckCFE (CommonFormError [Input])
- | PDE ProfileDataError
- | EmptyUsername
- data family ChildType m1
- data ClckwrksConfig = ClckwrksConfig {
- clckHostname :: String
- clckPort :: Int
- clckTLS :: Maybe TLSSettings
- clckHidePort :: Bool
- clckJQueryPath :: FilePath
- clckJQueryUIPath :: FilePath
- clckJSTreePath :: FilePath
- clckJSON2Path :: FilePath
- clckTopDir :: Maybe FilePath
- clckEnableAnalytics :: Bool
- clckInitHook :: Text -> ClckState -> ClckwrksConfig -> IO (ClckState, ClckwrksConfig)
- data TLSSettings = TLSSettings {}
- data family AttributeType m1
- data Theme = Theme {}
- data ThemeStyle = ThemeStyle {
- themeStyleName :: Text
- themeStyleDescription :: Text
- themeStylePreview :: Maybe FilePath
- themeStyleTemplate :: (EmbedAsChild (ClckT ClckURL (ServerPartT IO)) headers, EmbedAsChild (ClckT ClckURL (ServerPartT IO)) body) => Text -> headers -> body -> XMLGenT (ClckT ClckURL (ServerPartT IO)) XML
- newtype ThemeStyleId = ThemeStyleId {}
- type ThemeName = Text
- getThemeStyles :: MonadIO m => ClckPlugins -> m [(ThemeStyleId, ThemeStyle)]
- themeTemplate :: (EmbedAsChild (ClckT ClckURL (ServerPartT IO)) headers, EmbedAsChild (ClckT ClckURL (ServerPartT IO)) body) => ClckPlugins -> ThemeStyleId -> Text -> headers -> body -> ClckT ClckURL (ServerPartT IO) Response
- calcBaseURI :: ClckwrksConfig -> Text
- calcTLSBaseURI :: ClckwrksConfig -> Maybe Text
- evalClckT :: Monad m => (url -> [(Text, Maybe Text)] -> Text) -> ClckState -> ClckT url m a -> m a
- execClckT :: Monad m => (url -> [(Text, Maybe Text)] -> Text) -> ClckState -> ClckT url m a -> m ClckState
- runClckT :: Monad m => (url -> [(Text, Maybe Text)] -> Text) -> ClckState -> ClckT url m a -> m (a, ClckState)
- mapClckT :: (m (a, ClckState) -> n (b, ClckState)) -> ClckT url m a -> ClckT url n b
- withRouteClckT :: ((url' -> [(Text, Maybe Text)] -> Text) -> url -> [(Text, Maybe Text)] -> Text) -> ClckT url m a -> ClckT url' m a
- data ClckState = ClckState {
- acidState :: Acid
- uniqueId :: TVar Integer
- adminMenus :: [(Text, [(Set Role, Text, Text)])]
- enableAnalytics :: Bool
- plugins :: ClckPlugins
- requestInit :: ServerPart ()
- getUserId :: (Happstack m, GetAcidState m AuthState, GetAcidState m ProfileState) => m (Maybe UserId)
- data Content
- = TrustedHtml Text
- | PlainText Text
- addAdminMenu :: Monad m => (Text, [(Set Role, Text, Text)]) -> ClckT url m ()
- appendRequestInit :: Monad m => ServerPart () -> ClckT url m ()
- getNavBarLinks :: MonadIO m => Plugins theme n hook config ClckPluginsSt -> ClckT ClckURL m NavBarLinks
- addPreProc :: MonadIO m => Plugins theme n hook config ClckPluginsSt -> (Text -> ClckT ClckURL IO Text) -> m ()
- addNavBarCallback :: MonadIO m => Plugins theme n hook config ClckPluginsSt -> ClckT ClckURL IO (String, [NamedLink]) -> m ()
- getPreProcessors :: MonadIO m => Plugins theme n hook config ClckPluginsSt -> ClckT url m [Text -> ClckT ClckURL IO Text]
- getEnableAnalytics :: (Functor m, MonadState ClckState m) => m Bool
- googleAnalytics :: XMLGenT (Clck url) XML
- getUnique :: (Functor m, MonadIO m) => ClckT url m Integer
- setUnique :: (Functor m, MonadIO m) => Integer -> ClckT url m ()
- requiresRole :: Happstack m => Set Role -> url -> ClckT ClckURL m url
- requiresRole_ :: Happstack m => (ClckURL -> [(Text, Maybe Text)] -> Text) -> Set Role -> url -> ClckT u m url
- setRedirectCookie :: Happstack m => String -> m ()
- getRedirectCookie :: Happstack m => m (Maybe String)
- getUserRoles :: (Happstack m, MonadIO m) => ClckT u m (Set Role)
- query :: forall event m. (QueryEvent event, GetAcidState m (EventState event), Functor m, MonadIO m, MonadState ClckState m) => event -> m (EventResult event)
- update :: forall event m. (UpdateEvent event, GetAcidState m (EventState event), Functor m, MonadIO m, MonadState ClckState m) => event -> m (EventResult event)
- nestURL :: (url1 -> url2) -> ClckT url1 m a -> ClckT url2 m a
- withAbs :: Happstack m => ClckT url m a -> ClckT url m a
- withAbs' :: Text -> ClckT url m a -> ClckT url m a
- segments :: Text -> Parser a -> Parser [Segment a]
- transform :: Monad m => (cmd -> m Builder) -> [Segment cmd] -> m Builder
- module HSP.XML
- module HSP.XMLGenerator
Documentation
type Clck url = ClckT url (ServerPartT IO)Source
type ClckPlugins = Plugins Theme (ClckT ClckURL (ServerPartT IO) Response) (ClckT ClckURL IO ()) ClckwrksConfig ClckPluginsStSource
ClckPlugins
newtype Plugins theme m hook config st
data ClckPluginsSt Source
type ClckForm url = Form (ClckT url (ServerPartT IO)) [Input] ClckFormError [XMLGenT (ClckT url (ServerPartT IO)) XML] ()Source
type ClckFormT error m = Form m [Input] error [XMLGenT m XML] ()Source
ClckForm - type for reform forms
data ClckFormError Source
error returned when a reform Form
fails to validate
Show ClckFormError | |
FormError ClckFormError | |
(Functor m, MonadIO m, Happstack m) => EmbedAsChild (ClckT url m) ClckFormError |
data family ChildType m1
data ClckwrksConfig Source
ClckwrksConfig | |
|
data TLSSettings Source
TLSSettings | |
|
data family AttributeType m1
Theme | |
|
data ThemeStyle Source
ThemeStyle | |
|
newtype ThemeStyleId Source
getThemeStyles :: MonadIO m => ClckPlugins -> m [(ThemeStyleId, ThemeStyle)]Source
themeTemplate :: (EmbedAsChild (ClckT ClckURL (ServerPartT IO)) headers, EmbedAsChild (ClckT ClckURL (ServerPartT IO)) body) => ClckPlugins -> ThemeStyleId -> Text -> headers -> body -> ClckT ClckURL (ServerPartT IO) ResponseSource
calcBaseURI :: ClckwrksConfig -> TextSource
calculate the baseURI from the clckHostname
, clckPort
and clckHidePort
options
:: Monad m | |
=> (url -> [(Text, Maybe Text)] -> Text) | function to act as |
-> ClckState | initial |
-> ClckT url m a |
|
-> m a |
evaluate a ClckT
returning the inner monad
similar to evalStateT
.
:: Monad m | |
=> (url -> [(Text, Maybe Text)] -> Text) | function to act as |
-> ClckState | initial |
-> ClckT url m a |
|
-> m ClckState |
execute a ClckT
returning the final ClckState
similar to execStateT
.
:: (m (a, ClckState) -> n (b, ClckState)) | transformation function |
-> ClckT url m a | initial monad |
-> ClckT url n b |
map a transformation function over the inner monad
similar to mapStateT
withRouteClckT :: ((url' -> [(Text, Maybe Text)] -> Text) -> url -> [(Text, Maybe Text)] -> Text) -> ClckT url m a -> ClckT url' m aSource
change the route url
ClckState | |
|
Monad m => MonadState ClckState (ClckT url m) |
getUserId :: (Happstack m, GetAcidState m AuthState, GetAcidState m ProfileState) => m (Maybe UserId)Source
a wrapper which identifies how to treat different Text
values when attempting to embed them.
In general Content
values have already been
flattenpreprocessedetc and are now basic formats like
textplain@, @texthtml
, etc
addAdminMenu :: Monad m => (Text, [(Set Role, Text, Text)]) -> ClckT url m ()Source
add an Admin menu
appendRequestInit :: Monad m => ServerPart () -> ClckT url m ()Source
append an action to the request init
getNavBarLinks :: MonadIO m => Plugins theme n hook config ClckPluginsSt -> ClckT ClckURL m NavBarLinksSource
addPreProc :: MonadIO m => Plugins theme n hook config ClckPluginsSt -> (Text -> ClckT ClckURL IO Text) -> m ()Source
addNavBarCallback :: MonadIO m => Plugins theme n hook config ClckPluginsSt -> ClckT ClckURL IO (String, [NamedLink]) -> m ()Source
getPreProcessors :: MonadIO m => Plugins theme n hook config ClckPluginsSt -> ClckT url m [Text -> ClckT ClckURL IO Text]Source
getEnableAnalytics :: (Functor m, MonadState ClckState m) => m BoolSource
get the Bool
value indicating if Google Analytics should be enabled or not
googleAnalytics :: XMLGenT (Clck url) XMLSource
create a google analytics tracking code block
This will under two different conditions:
- the
enableAnalytics
field inClckState
isFalse
- the
uacct
field inPageState
isNothing
getUnique :: (Functor m, MonadIO m) => ClckT url m IntegerSource
get a unique Integer
.
Only unique for the current request
requiresRole_ :: Happstack m => (ClckURL -> [(Text, Maybe Text)] -> Text) -> Set Role -> url -> ClckT u m urlSource
setRedirectCookie :: Happstack m => String -> m ()Source
getRedirectCookie :: Happstack m => m (Maybe String)Source
query :: forall event m. (QueryEvent event, GetAcidState m (EventState event), Functor m, MonadIO m, MonadState ClckState m) => event -> m (EventResult event)Source
update :: forall event m. (UpdateEvent event, GetAcidState m (EventState event), Functor m, MonadIO m, MonadState ClckState m) => event -> m (EventResult event)Source
module HSP.XML
module HSP.XMLGenerator