Don't keep input for error messages
authorKlaus Aehlig <aehlig@google.com>
Wed, 18 Nov 2015 13:59:36 +0000 (14:59 +0100)
committerKlaus Aehlig <aehlig@google.com>
Thu, 19 Nov 2015 12:57:34 +0000 (13:57 +0100)
commitc22a355b12bf3875179c60e5cd4ee622d88ab89a
treed5476d8775aaf6f6045726d0a04a186f3339a489
parent4b6effe26a759c01bd7c665c6a80bc19477a2dbc
Don't keep input for error messages

When generating error messages, the raw JSValue is rarely
useful. However, keeping it for error messages---even if
only in the unused branch of an if statement---prevents this
value from going out of scope.

Note: with the smaller number of arguments in the readJSONWithDesc
function, newer versions of ghc try too fancy optimisations and thus
run out of memory; hence we have to reduce the ghc optimisation level
for some files.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Oleg Ponomarev <oponomarev@google.com>
src/Ganeti/JSON.hs
src/Ganeti/Objects/Instance.hs
src/Ganeti/OpCodes.hs
src/Ganeti/THH.hs