Eliminate Haskell constant for opcode names
authorJose A. Lopes <jabolopes@google.com>
Tue, 30 Jul 2013 12:34:42 +0000 (14:34 +0200)
committerJose A. Lopes <jabolopes@google.com>
Wed, 7 Aug 2013 07:41:46 +0000 (09:41 +0200)
commitd31193c3a1d3991738b4363e28036fd1e5c57522
treea7f136a36899d1abcbefde4c3a077b1757f44806
parent6c2c542ef0e2ade1787c29f2f544e5672c1ce0a9
Eliminate Haskell constant for opcode names

Modify 'autotools/convert-constants' not to generate the Haskell
constant that holds all opcode names.  By having Haskell generate the
Python opcopdes, it becomes impossible to generate this constant due
to a cyclic dependency.  However, this constant is used only in tests,
therefore, it can be generated from Template Haskell. This patch also
updates the test to execute a Python program to fetch the generated
opcode names instead of relying on the beforementioned constant.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
autotools/convert-constants
test/hs/Test/Ganeti/OpCodes.hs