It turns out that, in Python, booleans are also integers. So they fall
under the “isinstance(value, int)” case, resulting in all enable*
constants being integers in Haskell, which is not nice, even though
we're not using them directly today.
Patch simply adds a special casing for booleans, before integers.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
#!/usr/bin/python
#
-# Copyright (C) 2011, 2012 Google Inc.
+# Copyright (C) 2011, 2012, 2013 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
"""
if isinstance(value, basestring):
return ("String", "\"%s\"" % StringValueRules(value))
+ elif isinstance(value, bool):
+ return ("Bool", "%s" % value)
elif isinstance(value, int):
return ("Int", "%d" % value)
elif isinstance(value, long):