Status: Accepted
Owner: [email protected]
Labels: Type-Enhancement Milestone-Release2.12 Priority-Medium
Maintainability HaskellTask
New issue 1049 by [email protected]: Fix compilation with GHC 7.8+
https://code.google.com/p/ganeti/issues/detail?id=1049
What steps will reproduce the problem?
1. Install GHC 7.8
2. Configure the project and run 'make'
What is the expected output? What do you see instead?
In the libraries shipped since 7.8, Control.Monad.Error is deprecated in
favor of Control.Monad.Except. Not only this would require a change in many
places depending on the GHC's version, but 'fail' in 'Except' is
implemented differently than in 'Error' (in 'Except' it propagates to the
underlying monad, in 'Error' it's converted into an error).
I see 2 options how to fix that:
(1) Create an alias that we use everywhere and in the module that defines
the alias use CPP to differentiate between the 'transformers' version.
However, this doesn't solve the 'fail' issue, so it'd be necessary to very
carefully check all usages of 'fail' and replace them where appropriate
(which in long term would be a good thing to do).
(2) Use Result/GenericResult/ResultT everywhere instead of Error, or if
it's not suitable even create our own implementation of Error.
Another issues is that it seems that in GHC7.8 flag -dep-suffix is broken -
it doesn't add the underscore between the suffix and 'o', as it should
(according to the documentation and in previous versions).
Filing for 2.12 as it's the first version affected, but we might move it to
a later version, if it turns out to be easier.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings