Setup constant generation infrastructure
authorJose A. Lopes <jabolopes@google.com>
Tue, 27 Aug 2013 13:16:55 +0000 (15:16 +0200)
committerJose A. Lopes <jabolopes@google.com>
Thu, 29 Aug 2013 10:17:45 +0000 (12:17 +0200)
commit1b2adaa67411daf827d91f5169e859a1571200b8
treea1f7aedcddaba6ffa3839cae06f20454ddf4f416
parentfec1fac195e174d5971556aee22527cc569a8001
Setup constant generation infrastructure

Setup a transitional Haskell to Python constant generation
infrastructure.  This infrastructure is transitional and Python
constants will not be migrated to Haskell all at once.  Instead, some
constants will be incrementally pulled from Python and moved to
Haskell.  This is a list of the relevant modules in this
infrastructure:

* Ganeti.HsConstants: contains the Haskell constants that are used
  both in Haskell (once re-exported through Ganeti.Constants) and
  generated in Python

* Ganety.Hs2Py.ListConstants: contains the list of Haskell constants
  to be generated in Python; these constants are defined in the
  previous module and the list is automatically generated by the
  Makefile

* hs2py-constants: Haskell program that outputs the actual constant
  definitions in Python; this task cannot be performed by 'hs2py' just
  yet because this programs depends on the 'Constants' module. But
  once all the constants have migrated to Haskell, then
  'hs2py-constants' and 'hs2py' can be merged.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
.gitignore
Makefile.am
lib/_constants.py.in [new file with mode: 0644]
src/Ganeti/Hs2Py/ListConstants.hs.in [new file with mode: 0644]
src/Ganeti/HsConstants.hs [new file with mode: 0644]
src/hs2py-constants.hs [new file with mode: 0644]