- data PluginHandle
- initPlugins :: IO PluginHandle
- withServerPart :: Name -> ExpQ
- withServerPart_ :: (MonadIO m, ServerMonad m, FilterMonad Response m, WebMonad Response m) => Name -> a -> PluginHandle -> (a -> m b) -> m b
Documentation
data PluginHandle Source
initPlugins :: IO PluginHandleSource
initialize the plugin system and return a PluginHandle
withServerPart :: Name -> ExpQSource
dynamically load the specified symbol pass it as an argument to the supplied server monad function.
This is a wrapper aronud withServerPart_
which ensures the first
and second argument stay in-sync.
Usage:
$(withServerPart 'symbol) pluginHandle $ \a -> ...
:: (MonadIO m, ServerMonad m, FilterMonad Response m, WebMonad Response m) | |
=> Name | name of the symbol to dynamically load |
-> a | the symbol (must be the function refered to by the |
-> PluginHandle | Handle to the function reloader |
-> (a -> m b) | function which uses the loaded result |
-> m b |
dynamically load the specified symbol pass it as an argument to the supplied server monad function.
If something fails, this function will return '500 Internal Server Error' and a list of the errors encountered.
see also: withServerPart