From eda69033eb3279847ccdfbc60f43f88c6dedee65 Mon Sep 17 00:00:00 2001 From: Dominik Schrempf Date: Tue, 17 Jan 2023 14:46:00 +0100 Subject: [PATCH] doc/haskell: nits These are some suggested changes to the new documentation of Haskell in the Nixpkgs manual. They cover sections until, but excluding, the section "Available package versions". I am not an English native speaker, so please correct me and savage these changes! Also, please let me know if the suggestions are welcome, then I will continue with the next chapter. --- doc/languages-frameworks/haskell.section.md | 38 ++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/doc/languages-frameworks/haskell.section.md b/doc/languages-frameworks/haskell.section.md index 9c3ac6de620..f0b302bbc35 100644 --- a/doc/languages-frameworks/haskell.section.md +++ b/doc/languages-frameworks/haskell.section.md @@ -1,13 +1,13 @@ # Haskell {#haskell} -The Haskell infrastructure in nixpkgs has two main purposes: The primary purpose +The Haskell infrastructure in Nixpkgs has two main purposes: The primary purpose is to provide a Haskell compiler and build tools as well as infrastructure for packaging Haskell-based packages. -The secondary purpose is to provide support for Haskell development environment +The secondary purpose is to provide support for Haskell development environments including prebuilt Haskell libraries. However, in this area sacrifices have been -made due to self-imposed restrictions in nixpkgs, to lessen the maintenance -effort and improve performance. (More details in the subsection +made due to self-imposed restrictions in Nixpkgs, to lessen the maintenance +effort and to improve performance. (More details in the subsection [Limitations.](#haskell-limitations)) ## Available packages {#haskell-available-packages} @@ -18,17 +18,17 @@ The compiler and most build tools are exposed at the top level: * Language specific tools: `cabal-install`, `stack`, `hpack`, … Many “normal” user facing packages written in Haskell, like `niv` or `cachix`, -are also exposed at the top level, so there is nothing haskell specific to +are also exposed at the top level, and there is nothing Haskell specific to installing and using them. -All of these packages originally are defined in the `haskellPackages` package +All of these packages are originally defined in the `haskellPackages` package set and are re-exposed with a reduced dependency closure for convenience. (see `justStaticExecutables` below) The `haskellPackages` set includes at least one version of every package from Hackage as well as some manually injected packages. This amounts to a lot of packages, so it is hidden from `nix-env -qa` by default for performance reasons. -You can still list all packages in the set like this, though: +You can still list all packages in the set like this: ```console $ nix-env -f '' -qaP -A haskellPackages @@ -39,22 +39,22 @@ haskellPackages.abacate abac haskellPackages.abc-puzzle abc-puzzle-0.2.1 … ``` -Also the default set `haskellPackages` is included on [search.nixos.org]. +Also, the `haskellPackages` set is included on [search.nixos.org]. The attribute names in `haskellPackages` always correspond with their name on -Hackage. Since Hackage allows names that are not valid Nix without extra -escaping, you sometimes need to extra care when handling attribute names like -`3dmodels`. +Hackage. Since Hackage allows names that are not valid Nix without escaping, +you need to take care when handling attribute names like `3dmodels`. For packages that are part of [Stackage], we use the version prescribed by a Stackage solver (usually the current LTS one) as the default version. For all other packages we use the latest version from Hackage. See -[below](#haskell-available-versions) to learn which versions exactly are provided. +[below](#haskell-available-versions) to learn which versions are provided +exactly. Roughly half of the 16K packages contained in `haskellPackages` don't actually build and are marked as broken semi-automatically. Most of those packages are -deprecated or unmaintained, but sometimes packages that should, don't build. -Very often fixing them is not a lot of work. +deprecated or unmaintained, but sometimes packages that should build, do not +build. Very often fixing them is not a lot of work.