Make --cross-compile handle negative enum values.
authorStephen Paul Weber <singpolyma@singpolyma.net>
Thu, 30 Oct 2014 04:02:50 +0000 (23:02 -0500)
committerAustin Seipp <austin@well-typed.com>
Thu, 30 Oct 2014 04:03:59 +0000 (23:03 -0500)
Signed-off-by: Austin Seipp <austin@well-typed.com>
CrossCodegen.hs

index 687f5be..bb275ff 100644 (file)
@@ -452,7 +452,7 @@ computeEnum z@(ZCursor (Special _ _ enumText) _ _) =
                 let hsName = fromMaybe (haskellize cName) maybeHsName
                 return $
                     hsName ++ " :: " ++ stringify enumType ++ "\n" ++
-                    hsName ++ " = " ++ stringify constructor ++ " " ++ show constValue ++ "\n"
+                    hsName ++ " = " ++ stringify constructor ++ " " ++ showsPrec 11 constValue "\n"
     where concatM l = liftM concat . forM l
 computeEnum _ = error "computeEnum argument isn't a Special"