Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 78034cd67cea^
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: de8fc9f9232a
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jul 3, 2020

  1. haskellPackages: doHaddockInterfaces

    This adds a new builder option `doHaddockInterfaces` to enable the -haddock flag in GHC,
    which results in Haddock comments parsed at compile-time and embedded in
    interface files. These are used by the :doc command in GHCi, as well as IDE
    tools like ghcide and hls to display docs on hover.
    
    The `-haddock` flag has been around since at least 8.2, even though it does not
    get a mention in the GHC Users guide.
    
    There are two downsides to turning on this flag:
    
    1. Increased compile times, since Haddocks must be parsed and then encoded
    2. Haddock parse errors now become compile errors
       (https://gitlab.haskell.org/ghc/ghc/-/issues/8944)
    
    Item 2 in particular can be quite problematic for benchmarks and test suites,
    where Haddock parse errors would not be a consideration.
    This explains the default setting for `doHaddockInterfaces` being `doHaddock && !doCheck `.
    Once the problem is [fixed](https://gitlab.haskell.org/ghc/ghc/-/issues/8944) in
    GHC, the `doHaddockInterfaces` default value can be updated to be always on in
    certain GHC versions.
    pepeiborra authored and peti committed Jul 3, 2020
    Copy the full SHA
    78034cd View commit details
    Browse the repository at this point in the history
  2. Enable doHaddockInterfaces by default

    This is a priori an experiment to find out how many packages break
    pepeiborra authored and peti committed Jul 3, 2020
    Copy the full SHA
    de8fc9f View commit details
    Browse the repository at this point in the history