Legend:

* We define a new ''Cabal Hash'' that hashes the compilation inputs (the `LocalBuildInfo` and the contents of the source files)

37

37

* `XXXX` is a GUID.

38

* Why not use the ''Cabal Hash''? We could, but then there could conceivably be a clash.

38

* Why not use the ''Cabal Hash''? We could, but then there could conceivably be a clash. (Andres - please expand this point, I have forgotten the full rationale).

39

39

* `YYYY` is the combination of the ''Cabal Hash'' and `ZZZZ` (concatenated)

40

* `ZZZZ` is recorded in the package database. When two packages have identical `ZZZZ`s then they are interface-compatible, and the user might in the future want to change a particular dependency to use a different package but the the same `ZZZZ`. We do not want to make this change automatically, because even when two packages have identical `ZZZZ`s, they may have different behaviour (e.g. bugfixes).

41

40

* `ZZZZ` is recorded in the package database as a new field `abi-hash`.

41

* When two packages have identical `ZZZZ`s then they are interface-compatible, and the user might in the future want to change a particular dependency to use a different package but the the same `ZZZZ`. We do not want to make this change automatically, because even when two packages have identical `ZZZZ`s, they may have different behaviour (e.g. bugfixes).