-
Notifications
You must be signed in to change notification settings - Fork 697
2.0 migration guide
Erik de Castro Lopo edited this page May 1, 2017
·
6 revisions
Cabal 2.0 comes with a number of backwards-compatibility breaking changes. This page documents some of them and gives advice on how to adjust your code for the new APIs. When possible, we will give guidance on how to write your code in a way that is simultaneously compatible with 2.0 and earlier versions, but in many cases you will have to use CPP to handle the differences.
The following data types are now opaque (in order to support a more efficient underlying representation):
PackageName
FlagName
AbiHash
Version
-
readPackageDescription
(fromDistribution.PackageDescription.Parse
) is deprecated in favor ofreadGenericPackageDescription
.
To construct these types, use mkXXXXX
; to destruct them, use unXXXXX
. These types can also be converted back into strings using display
, which is backwards compatible with old versions of Cabal.