Commit bb2026c4 authored by
Make `Version` type opaque (#3905)
Similiar to dabd9d98 which made `PackageName` opaque, this makes `Distribution.Version.Version` opaque. The most common version numbers occuring on Hackage are 3- and 4-part versions. This results in significant Heap overhead due to `Data.Version`'s inefficient internal representation. So like the `PackageName` commit, this commit is a preparatory commit to pave the way for replacing `Version`'s internal representation by a representation with a memory footprint which can be an order of magnitude smaller. Finally, this also adds a new functor-like convenience function alterVersion :: ([Int] -> [Int]) -> Version -> Version for modifying the version number components.
Showing with 362 additions and 324 deletions