doc/haskell: Add clarifications in section about versions

authored by

maralorn and committed by
sternenseemann
b5fa92b2 571a7055

+13 -6
+13 -6
doc/languages-frameworks/haskell.section.md
··· 137 137 this to get them or their reverse dependencies to compile in our package set. 138 138 4. For all packages, for which the newest Hackage version is not the default 139 139 version, there will also be a `haskellPackages.foo_x_y_z` package with the 140 - newest version. 140 + newest version. The `x_y_z` part encodes the version with dots replaced by 141 + underscores. When the newest version changes by a new release to Hackage the 142 + old package will disappear under that name and be replaced by a newer one under 143 + the name with the new version. The package name including the version will 144 + also disappear when the default version e.g. from Stackage catches up with the 145 + newest version from Hackage. 141 146 5. For some packages, we also manually add other `haskellPackages.foo_x_y_z` 142 147 versions, if they are required for a certain build. 143 148 ··· 161 166 162 167 The [Haskell builder in nixpkgs](#haskell-mkderivation) does no such thing. 163 168 It will simply take as input packages with names off the desired dependencies 164 - and just check whether they fulfill the version bounds and (by default, see 165 - `jailbreak`) fail if they don’t. 169 + and just check whether they fulfill the version bounds and fail if they don’t 170 + (by default, see `jailbreak` to circumvent this). 166 171 167 - The package resolution is done by the `haskellPackages.callPackage` function 168 - which will, e.g., use `haskellPackages.aeson` for a package input of name 169 - `aeson`. 172 + The `haskellPackages.callPackage` function does the package resolution. 173 + It will, e.g., use `haskellPackages.aeson`which has the default version as 174 + described above for a package input of name `aeson`. (More general: 175 + `<packages>.callPackage f` will call `f` with named inputs provided from the 176 + package set `<packages>`.) 170 177 While this is the default behavior, it is possible to override the dependencies 171 178 for a specific package, see 172 179 [`override` and `overrideScope`](#haskell-overriding-haskell-packages).