Add Template Haskell 'declareLADT'
authorJose A. Lopes <jabolopes@google.com>
Mon, 16 Sep 2013 13:26:31 +0000 (15:26 +0200)
committerJose A. Lopes <jabolopes@google.com>
Wed, 18 Sep 2013 11:33:18 +0000 (13:33 +0200)
commite82d1e9846457b2a17aca66d83c612902679f012
tree6fe5536d02421b7a8e34fd55ec97c690a63897ea
parent216bfc8fe9f63644cf4c339939f205fe987531b5
Add Template Haskell 'declareLADT'

Add 'declareLADT' in Template Haskell module to declare Haskell
datatypes using 'String's directly as values for the JSON
serialization, as opposed to 'Name's which is what the current
'declareADT' allows.  To achieve this, 'genFromRaw' must be
generalized, similarly to 'genToRaw'.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
src/Ganeti/THH.hs