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

Safe HaskellNone

Network.YAML.TH.Dispatcher

Synopsis

Documentation

class ToValueFn m whereSource

Only functions of this class can be exposed

Methods

toValueFn :: m -> ValueFnSource

Instances

ToJSON y => ToValueFn (IO y) 
(FromJSON x, ToValueFn f) => ToValueFn (x -> f) 

type Dispatcher = Text -> Maybe ValueFnSource

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

generateDispatcher :: API -> Q [Dec]Source

Generate dispatcher function. This will generate function called dispatcher.