Statistics
| Branch: | Tag: | Revision:

root / htools / Ganeti @ 60de49c3

Name Size
  HTools
Constants.hs.in 835 Bytes
Jobs.hs 2.1 kB
Luxi.hs 8.3 kB
OpCodes.hs 2.8 kB
THH.hs 16.6 kB

Latest revisions

# Date Author Comment
60de49c3 10/11/2011 11:23 am Iustin Pop

Skip application of 'id' in TH code

This is just beautification when dumping splices to stdout, as ghc
will optimise the 'id' away anyway.

Original generate code:

opToArgs QueryTags kind name = J.showJSON (id kind, id name)

Afterwards:

opToArgs QueryTags kind name = J.showJSON (kind, name)...
a0090487 10/06/2011 11:21 am Agata Murawska

Use TemplateHaskell to create LUXI operations

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>

53664e15 10/03/2011 12:17 pm Iustin Pop

Some TH simplifications

Now that the basic code works, let's use some aliases for simpler code
and less ))))))))).

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

72bb6b4e 10/03/2011 12:17 pm Iustin Pop

A few minor test improvements

This patch adds a few niceties to the test suite:

- allows matching test groups case insensitive and emit warnings when
we give test group names that don't match anything
- add a new operator that is similar to assertEqual in Python: it...

23fe06c2 10/03/2011 12:17 pm Iustin Pop

Use TemplateHaskell to decorate tests with names

This makes error message change from "Test 4 failed …" to "Test
prop_Loader_mergeData failed", which is much more readable. It also
removes the duplication of test suite names in the test.hs file.

Signed-off-by: Iustin Pop <>...

12c19659 10/03/2011 12:17 pm Iustin Pop

Use TemplateHaskell to generate opcode serialisation

This replaces the hand-coded opcode serialisation code with
auto-generation based on TemplateHaskell.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

6111e296 10/03/2011 12:17 pm Iustin Pop

Use TemplateHaskell to build the opID function

This replaces the hand-coded opID with one automatically generated
from the constructor names, similar to the way Python does it, except
it's done at compilation time as opposed to runtime.

Again, the code line delta does not favour this patch, but this...

e9aaa3c6 10/03/2011 12:17 pm Iustin Pop

Use TemplateHaskell instead of hand-coded instances

This patch replaces the current hard-coded JSON instances (all alike,
just manual conversion to/from string) with auto-generated code based
on Template Haskell
(http://www.haskell.org/haskellwiki/Template_Haskell)....

2c9336a4 10/03/2011 12:17 pm Iustin Pop

Rename some helper functions for consistency

This changes the names for some helper functions so that future
patches are touching less unrelated code. The change replaces
shortened prefixes with the full type name.

Signed-off-by: Iustin Pop <>...

f047f90f 10/03/2011 12:16 pm Iustin Pop

Split part of Utils.hs into JSON.hs

Utils is a bit big, let's split the JSON stuff (not all of it) into a
separate module that doesn't have any other dependencies.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

View revisions

Also available in: Atom