This project is mirrored from https://github.com/haskell/haddock. Pull mirroring updated .
  1. 29 Jul, 2020 1 commit
  2. 25 May, 2020 1 commit
  3. 25 Apr, 2020 1 commit
  4. 21 Apr, 2020 1 commit
    • Alec Theriault's avatar
      Fallback to `hiDecl` when `extractDecl` fails · 5bc5016a
      Alec Theriault authored
      Sometimes, the declaration being exported is a subdecl (for instance, a
      record accessor getting exported at the top-level). For these cases,
      Haddock has to find a way to produce some synthetic sensible top-level
      declaration. This is done with `extractDecl`.
      
      As is shown by #1067, this is sometimes impossible to do just at a
      syntactic level (for instance when the subdecl is re-exported). In these
      cases, the only sensible thing to do is to try to reify a declaration
      based on a GHC `TyThing` via `hiDecl`.
      5bc5016a
  5. 15 Apr, 2020 2 commits
    • Alec Theriault's avatar
      Don't warn about missing links in miminal sigs · 83f0fa0b
      Alec Theriault authored
      When renaming the Haddock interface, never emit warnings when renaming a
      minimal signature. Also added some documention around `renameInterface`.
      
      Minimal signatures intentionally include references to potentially
      un-exported methods (see the discussion in #330), so it is expected
      that they will not always have a link destination. On the principle
      that warnings should always be resolvable, this shouldn't produce a
      warning. See #1070.
      83f0fa0b
    • Alec Theriault's avatar
      Prune docstrings that are never rendered · 8d831107
      Alec Theriault authored
      When first creating a Haddock interface, trim `ifaceDocMap` and
      `ifaceArgMap` to not include docstrings that can never appear in the
      final output. Besides checking with GHC which names are exported, we
      also need to keep all the docs attached to instance declarations (it is
      much tougher to detect when an instance is fully private).
      
      This change means:
      
        * slightly smaller interface files (7% reduction on boot libs)
        * slightly less work to do processing docstrings that aren't used
        * no warnings in Haddock's output about private docstrings (see #1070)
      
      I've tested manually that this does not affect any of the boot library
      generated docs (the only change in output was some small re-ordering in
      a handful of instance lists). This should mean no docstrings have been
      incorrectly dropped.
      8d831107
  6. 10 Apr, 2020 1 commit
  7. 05 Apr, 2020 1 commit
    • Ryan Scott's avatar
      Fix #1050 by filtering out invisible AppTy arguments · 87fbc112
      Ryan Scott authored
      This makes the `synifyType` case for `AppTy` more intelligent by
      taking into consideration the visibilities of each `AppTy` argument
      and filtering out any invisible arguments, as they aren't intended
      to be displayed in the source code. (See #1050 for an example of what
      can happen if you fail to filter these out.)
      
      Along the way, I noticed that a special `synifyType` case for
      `AppTy t1 (CoercionTy {})` could be consolidated with the case below
      it, so I took the opportunity to tidy this up.
      87fbc112
  8. 02 Apr, 2020 1 commit
  9. 28 Mar, 2020 8 commits
    • Alec Theriault's avatar
      Disallow links in section headers · 5dc38669
      Alec Theriault authored
      This is quite straightforward to implement, since we already had a
      function `docToHtmlNoAnchors` (which we used to generate the link in the
      sidebar "Contents").
      
      This breaks test `Bug387`, but that test case has aged badly: we now
      automatically generate anchors for all headings, so manually adding an
      anchor in a section makes no sense. Nested anchors are, as pointed out
      in #1054, disallowed by the HTML standard.
      
      Fixes #1054
      5dc38669
    • Alec Theriault's avatar
      `haddock-library` document header level · d8bedeb9
      Alec Theriault authored
      Document the fact the header level is going to always be between 1 and 6
      inclusive. Along the way, I also optimized the parsing code a bit.
      d8bedeb9
    • Alec Theriault's avatar
      Cleanup up GHC flags in `.cabal` files · 8edc70fe
      Alec Theriault authored
        * enable more useful warning flags in `haddock-api`, handle the new
          warnings generated
      
        * remove `-fwarn-tabs` (now we'd use `-Wtabs`, but this has been in
          `-Wall` for a while now)
      8edc70fe
    • Alec Theriault's avatar
      Use `unLoc`/`noLoc` from GHC instead of `unL`/`reL` · b33e4beb
      Alec Theriault authored
       * `unL` is already defined by GHC as `unLoc`
       * `reL` is already defined by GHC as `noLoc` (in a safer way too!)
       * Condense `setOutputDir` and add a about exporting from GHC
      
      Fixes #978
      b33e4beb
    • Alec Theriault's avatar
      Use TTG empty extensions to remove some `error`'s · 730a2163
      Alec Theriault authored
      None of these error cases should ever have been reachable, so this is
      just a matter of leveraging the type system to assert this.
      
        * Use the `NoExtCon` and `noExtCon` to handle case matches for no
          extension constructors, instead of throwing an `error`.
      
        * Use the extension field of `HsSpliceTy` to ensure that this variant
          of `HsType` cannot exist in an `HsType DocNameI`.
      730a2163
    • Alec Theriault's avatar
      Remove unused `Haddock.Utils` functions · e68cc0f0
      Alec Theriault authored
        * removed functions in `Haddock.Utils` that were not used anywhere
          (or exported from the `haddock-api` package)
      
        * moved GHC-specific utils from `Haddock.Utils` to `Haddock.GhcUtils`
      e68cc0f0
    • Alec Theriault's avatar
      Disallow qualified uses of reserved identifiers · 2a2020c5
      Alec Theriault authored
      This a GHC bug (ghc#14109) too,
      but it is a relatively easy fix in Haddock. Note that the fix must live
      in `haddock-api` instead of `haddock-library` because we can only really
      decide if an identifier is a reserved one by asking the GHC lexer.
      
      Fixes #952
      2a2020c5
    • Alec Theriault's avatar
      Fix crash in `haddock-library` on unicode space · b0514cc5
      Alec Theriault authored
      Our quickcheck tests for `haddock-library` stumbled across an edge case
      input that was causing Haddock to crash: it was a unicode space
      character.
      
      The root cause of the crash is that we were implicitly assuming that
      if a space character was not " \t\f\v\r", it would have to be "\n".
      We fix this by instead defining horizontal space as: any space character
      that is not '\n'.
      
      Fixes #1142
      b0514cc5
  10. 27 Mar, 2020 2 commits
    • Alec Theriault's avatar
      Update README · 8c653263
      Alec Theriault authored
      Removed some out of date links/info, added some more useful links.
      
        * badge to Hackage
        * update old trac link
        * `ghc-head` => `ghc-8.10`
        * `cabal new-*` is now `cabal v2-*` and it should Just Work
        * `--test-option='--accept'` is the way to accept testsuite output
      8c653263
    • Alec Theriault's avatar
      Update `.travis.yml` to work with GHC 8.10.1 · 7013f52c
      Alec Theriault authored
        * Regenerated the Travis file with `haskell-ci`
      
        * Beef up `.cabal` files with more `tested-with` information
      7013f52c
  11. 23 Mar, 2020 1 commit
    • Alec Theriault's avatar
      Tentative 2.24 release · 03dbfdd7
      Alec Theriault authored
      Adjusted changelogs and versions in `.cabal` files in preparation for
      the upcoming release bundled with GHC 8.10.
      03dbfdd7
  12. 22 Mar, 2020 2 commits
    • Alec Theriault's avatar
      Fix NPM security warnings · d576b232
      Alec Theriault authored
      This was done by calling `npm audit fix`. Note that the security issues
      seem to have been entirely in the build dependencies, since the output
      JS has not changed.
      d576b232
    • Alec Theriault's avatar
      Clean up warnings · 5bef8bd8
      Alec Theriault authored
        * unused imports
        * imports of `Data.List` without import lists
        * missing `CompatPrelude` file in `.cabal`
      5bef8bd8
  13. 21 Mar, 2020 2 commits
  14. 19 Mar, 2020 3 commits
  15. 08 Dec, 2019 2 commits
    • Herbert Valerio Riedel's avatar
      Fix build-failure regression for base < 4.7 · be8b02c4
      Herbert Valerio Riedel authored
      The `$>` operator definition is available only since base-4.7 which
      unfortunately wasn't caught before release to Hackage (but has been
      fixed up by a metadata-revision)
      
      This commit introduces a `CompatPrelude` module which allows to reduce
      the amount of CPP by ousting it to a central location, i.e. the new
      `CompatPrelude` module. This pattern also tends to reduce the tricks
      needed to silence unused import warnings.
      
      Addresses #1119
      be8b02c4
    • Herbert Valerio Riedel's avatar
      Document error-prone conditional definition of instances · ee05ff1e
      Herbert Valerio Riedel authored
      This can easily trip up people if one isn't aware of it. Usually it's
      better to avoid this kind of conditionality especially for typeclasses
      for which there's an compat-package as conditional instances like
      these tend to fragment the ecosystem into those packages that go the
      extra mile to provide backward compat via those compat-packages and
      those that fail to do so.
      ee05ff1e
  16. 10 Nov, 2019 1 commit
  17. 03 Nov, 2019 1 commit
    • Ryan Scott's avatar
      Changes from #14579 · e6ca1009
      Ryan Scott authored
      We now have a top-level `tyConAppNeedsKindSig` function, which means
      that we can delete lots of code in `Convert`.
      
      (cherry picked from commit cfd682c5)
      e6ca1009
  18. 01 Nov, 2019 1 commit
  19. 27 Oct, 2019 1 commit
  20. 25 Oct, 2019 1 commit
  21. 23 Oct, 2019 1 commit
  22. 22 Oct, 2019 1 commit
  23. 21 Oct, 2019 1 commit
  24. 08 Oct, 2019 1 commit
  25. 07 Oct, 2019 2 commits