dbus-qq-0.1.0: Quasi-quoter for DBus functions

Safe HaskellNone

DBus.QuasiQuoter

Synopsis

Documentation

dbus :: QuasiQuoterSource

A quasi-quoter to convert a function of type [Variant] -> [Variant] into a function of a specified static type.

This quasi-quoter takes a signature of the form:

   <dbus types> -> <dbus types>

Types on the left of the arrow correspond to argument types, while those on the right are return types.

The result is a combinator which takes any function of type [Variant] -> [Variant], assumes that its arguments and results are of the specified number and types, and returns a function of the corresponding static type.

For example, if f :: [Variant] -> [Variant],

   [dbus| i s -> s a{uv} |] f

has type

   Int -> String -> (String, Map Word32 Variant)

dbusF :: QuasiQuoterSource

A generalized version of the dbus quasi-quoter which works on functions of type [Variant] -> f [Variant], for any Functor f.