Statistics
| Branch: | Tag: | Revision:

root / src / Ganeti / THH @ 35cded14

Name Size
PyRPC.hs 6.7 kB
PyType.hs 3.9 kB
RPC.hs 3.4 kB
Types.hs 3.3 kB

Latest revisions

# Date Author Comment
dee434c2 03/03/2014 06:05 pm Klaus Aehlig

Support name generation for pairs

Add support for naming of python variables if the type
is a pair.

Note: on older versions of haskell, Q is not an instance of
Applicative, hence we use the do-syntax here.

Signed-off-by: Klaus Aehlig <>...

2992f2f7 02/28/2014 02:31 pm Klaus Aehlig

Fix generic uncurrying

in the case of n>1, the n-ary uncurry function is of the form
\f (x_1, ..., x_n) -> ... rather than \f x_1 ... x_n -> ...

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

857a05fe 02/18/2014 12:30 pm Petr Pudlak

Disable deprecation warnings in PyRPC

Since on Debian Squeeze we have TH version 2.4, we need to use 'report'
instead of 'reportWarning/reportError'. However, 'report' is deprecated
in later versions, therefore we need to disable the warning.

The warning doesn't manifest on Debian Squeeze or Wheezy, but causes...

f952ed9f 02/14/2014 11:47 am Petr Pudlak

Generate Python stubs by inspecting functions using TH

The names of the arguments of generated Python methods are derived from
Haskell types to be as descriptive as possible.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

a85aef5c 02/14/2014 11:46 am Petr Pudlak

Add a generic RPC module

The main function in this module takes a list of names of functions and
uses TH to create an RPC server, represented as a value of type Handler
(from Ganeti.UDSServer). This can be readily used to create a daemon
that dispatches RPC requests to the given functions....

f3a522ff 02/14/2014 11:46 am Petr Pudlak

Add common functions for working with TH's Type

In particular, functions for extracting types of arguments from a
function type, and for uncurrying functions with an arbitrary number of
arguments.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

6897a51e 12/13/2013 02:58 pm Petr Pudlak

Use a data type when generating Python types of OpCodes

Currently they are generated only as Strings.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Jose A. Lopes <>

View revisions

Also available in: Atom