yaml-rpc-1.0.3: Simple library for network (HTTP REST-like) YAML RPC

Safe HaskellNone

Network.YAML.TH.Dispatcher

Synopsis

Documentation

type ValueFn m = Value -> m ValueSource

class ToValueFn m f whereSource

Only functions of this class can be exposed

Methods

toValueFn :: f -> ValueFn mSource

Instances

(ToJSON y, MonadIO m) => ToValueFn m (m y) 
(Monad m, FromJSON x, ToValueFn m f) => ToValueFn m (x -> f) 

type Dispatcher m = Text -> Maybe (ValueFn m)Source

Dispatcher function gets method name and returns corresponding function, or Nothing if there is no such method.

generateDispatcherT :: Name -> API -> Q [Dec]Source

Generate dispatcher function. This will generate function called dispatcher.