Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/haddock. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer or owner.
Last successful update .
  1. Sep 20, 2019
  2. Jun 04, 2019
  3. May 26, 2019
  4. May 17, 2019
    • Alec Theriault's avatar
      Fix #1063 with better parenthesization logic for contexts · 384577e8
      Alec Theriault authored
      The only other change in html/hoogle/hyperlinker output for the boot
      libraries that this caused is a fix to some Hoogle output for implicit
      params.
      
      ```
      $ diff -r _build/docs/ old_docs
      diff -r _build/docs/html/libraries/base/base.txt old_docs/html/libraries/base/base.txt
      13296c13296
      < assertError :: (?callStack :: CallStack) => Bool -> a -> a
      ---
      > assertError :: ?callStack :: CallStack => Bool -> a -> a
      ```
      384577e8
    • Alec Theriault's avatar
      Unbreak #1004 test case · b4c2b90d
      Alec Theriault authored
      `fail` is no longer part of `Monad`.
      b4c2b90d
  5. May 13, 2019
  6. May 05, 2019
  7. Mar 29, 2019
  8. Mar 09, 2019
    • Alec Theriault's avatar
      Many LaTeX backend fixes · ae23b4f2
      Alec Theriault authored
      After this commit, we can run with `--latex` on all boot libraries
      without crashing (although the generated LaTeX still fails to compile in
      a handful of larger packages like `ghc` and `base`).
      
       * Add newlines after all block elements in LaTeX. This is important to
         prevent the final output from being more an more indented. See the
         `latext-test/src/Example` test case for a sample of this.
      
       * Support associated types in class declarations (but not yet defaults)
      
       * Several small issues for producing compiling LaTeX;
           - avoid empy `\haddockbeginargs` lists (ex: `type family Any`)
           - properly escape identifiers depending on context (ex: `Int#`)
           - add `vbox` around `itemize`/`enumerate` (so they can be in tables)
      
       * Several spacing fixes:
           - limit the width of `Pretty`-arranged monospaced code
           - cut out extra space characters in export lists
           - only escape spaces if there are _multiple_ spaces
           - allow type signatures to be multiline (even without docs)
      
       * Remove uninteresting and repetitive `main.tex`/`haddock.sty` files
         from `latex-test` test reference output.
      
      Fixes #935, #929 (LaTeX docs for `text` build & compile)
      Fixes #727, #930 (I think both are really about type families...)
      ae23b4f2
    • Alec Theriault's avatar
      Avoid multi-line `emph` in LaTeX backend · 747dfc71
      Alec Theriault authored
      `markupWarning` often processes inputs which span across paragraphs.
      Unfortunately, LaTeX's `emph` is not made to handle this (and will
      crash).
      
      Fixes #936.
      747dfc71
    • Alec Theriault's avatar
      Better support for default methods in classes · abb448ff
      Alec Theriault authored
        * default methods now get rendered differently
        * default associated types get rendered
        * fix a forgotten `s/TypeSig/ClassOpSig/` refactor in LaTeX backend
        * LaTeX backend now renders default method signatures
      
      NB: there is still no way to document default class members and the
      NB: LaTeX backend still crashes on associated types
      abb448ff
    • Alec Theriault's avatar
      Add .hi, .dyn_hi, etc files to .gitignore · 50cf0017
      Alec Theriault authored
      Fixes #1030.
      50cf0017
  9. Mar 03, 2019
  10. Mar 01, 2019
    • gershomb's avatar
      Increase contrast of Linuwal theme (#1037) · 8964666e
      gershomb authored and Alec Theriault's avatar Alec Theriault committed
      This is to address the concern that, on less nice and older screens,
      some of the shades of grey blend in too easily with the white
      background.
      
       * darken the font slightly
       * darken slightly the grey behind type signatures and such
       * add a border and round the corners on code blocks
       * knock the font down by one point
      8964666e
  11. Feb 28, 2019
  12. Feb 27, 2019
    • Alec Theriault's avatar
      Fix bogus identifier defaulting · b682041e
      Alec Theriault authored
      This avoids a situation in which an identifier would get defaulted to
      a completely different identifier. Prior to this commit, the 'Bug1035'
      test case would hyperlink 'Foo' into 'Bar'!
      
      Fixes #1035.
      b682041e
  13. Feb 26, 2019
    • Alec Theriault's avatar
      Fix standalone deriving docs · 5d45da48
      Alec Theriault authored
      Docs on standalone deriving decls for classes with associated types
      should be associated with the class instance, not the associated type
      instance.
      
      Fixes #1033
      5d45da48
  14. Feb 25, 2019
    • Alec Theriault's avatar
      Better identifier parsing · a5199600
      Alec Theriault authored
        * '(<|>)' and '`elem`' now get parsed and rendered properly as links
        * 'DbModule'/'DbUnitId' now properly get split apart into two links
        * tuple names now get parsed properly
        * some more small niceties...
      
      The identifier parsing code is more precise and more efficient (although to be
      fair: it is also longer and in its own module). On the rendering side, we need
      to pipe through information about backticks/parens/neither all the way through
      from renaming to the backends.
      
      In terms of impact: a total of 35 modules in the entirety of the bootlib + ghc
      lib docs change. The only "regression" is things like '\0'. These should be
      changed to @\\0@ (the path by which this previously worked seems accidental).
      a5199600
    • Alec Theriault's avatar
      Support value/type namespaces on identifier links · dd47029c
      Alec Theriault authored
      Identifier links can be prefixed with a 'v' or 't' to indicate the value or
      type namespace of the desired identifier. For example:
      
      -- | Some link to a value: v'Data.Functor.Identity'
      --
      -- Some link to a type: t'Data.Functor.Identity'
      
      The default is still the type (with a warning about the ambiguity)
      dd47029c
  15. Feb 04, 2019
    • Ryan Scott's avatar
      Fix #1015 with dataConUserTyVars (#1022) · 44226fc0
      Ryan Scott authored and Alec Theriault's avatar Alec Theriault committed
      The central trick in this patch is to use `dataConUserTyVars` instead of
      `univ_tvs ++ ex_tvs`, which displays the foralls in a GADT constructor in
      a way that's more faithful to how the user originally wrote it.
      
      Fixes #1015.
      44226fc0
    • Oleg Grenrus's avatar
      Make a fixture of weird parsing of lists (#997) · cacd245a
      Oleg Grenrus authored and Alec Theriault's avatar Alec Theriault committed
      The second example is interesting.
      If there's a list directly after the header, and that list has
      deeper structure, the parser is confused: It finds two lists:
      
       - One with the first nested element,
       - everything after it
      
      I'm not trying to fix this, as I'm not even sure this is a bug,
      and not a feature.
      cacd245a
    • Alec Theriault's avatar
      Miscellaneous improvements to `Convert` (#1020) · aa9644fc
      Alec Theriault authored
      Now that Haddock is moving towards working entirely over `.hi` and `.hie` files,
      all declarations and types are going to be synthesized via the `Convert` module.
      In preparation for this change, here are a bunch of fixes to this module:
      
        * Add kind annotations to type variables in `forall`'s whose kind is not `Type`,
          unless the kind can be inferred from some later use of the variable. See
          `implicitForAll` and `noKindTyVars` in particular if you wish to dive into this.
      
        * Properly detect `HsQualTy` in `synifyType`. This is done by following suit with
          what GHC's `toIfaceTypeX` does and checking the first argument of
          `FunTy{} :: Type` to see if it classified as a given/wanted in the typechecker
          (see `isPredTy`). 
      
        * Beef up the logic around figuring out when an explicit `forall` is needed. This
          includes: observing if any of the type variables will need kind signatures, if the
          inferred type variable order _without_ a forall will still match the one GHC
          claims, and some other small things.
      
        * Add some (not yet used) functionality for default levity polymorphic type
          signatures. This functionality similar to `fprint-explicit-runtime-reps`.
      
      Couple other smaller fixes only worth mentioning:
      
        * Show the family result signature only when it isn't `Type`
        * Fix rendering of implicit parameters in the LaTeX and Hoogle backends
        * Better handling of the return kind of polykinded H98 data declarations
        * Class decls produced by `tyThingToLHsDecl` now contain associated type
          defaults and default method signatures when appropriate
        * Filter out more `forall`'s in pattern synonyms
      aa9644fc
  16. Feb 03, 2019
    • Alec Theriault's avatar
      Remove `Documentation.Haddock.Utf8` · a0973d09
      Alec Theriault authored
      The circumstances under which this module appeared are completely gone.
      The Hyperlinker backend no longer needs this module (it uses the more
      efficient `Encoding` module from `ghc`).
      
      Why no deprecation? Because this module really shouldn't exist!
      
        - It isn't used in `haddock-library`/`haddock-api` anymore
        - It was copy pasted directly from `utf8-string`
        - Folks seeking a boot-lib only solution can use `ghc`'s `Encoding`
      a0973d09
    • Nathan Collins's avatar
      Update README instructions for Stack · 032ff0dd
      Nathan Collins authored and Alec Theriault's avatar Alec Theriault committed
      No need to `stack install` Haddock to test it. Indeed, `stack install` changes the `haddock` on user's `PATH` if `~/.local/bin` is on user's `PATH` which may not be desirable when hacking on Haddock.
      032ff0dd
    • Alec Theriault's avatar
      Fix some Hyperlinker test suite fallout · bf07847e
      Alec Theriault authored
      * Amend `ParserSpec` to match new Hyperlinker API
          - pass in compiler info
          - strip out null tokens
      
      * Make `hypsrc-test` pass reliably
          - strip out `local-*` ids
          - strip out `line-*` ids from the `ClangCppBug` test
          - re-accept output
      bf07847e
    • Alec Theriault's avatar
      CI: fetch GHC from validate artifact · bc683d66
      Alec Theriault authored
      Should help make CI be less broken
      bc683d66
  17. Feb 02, 2019
  18. Jan 31, 2019
    • Alec Theriault's avatar
      Use `.hie` files for the Hyperlinker backend (#977) · 1b26460f
      Alec Theriault authored
      # Summary
      
      This is a large architectural change to the Hyperlinker.
      
        * extract link (and now also type) information from `.hie` instead
          of doing ad-hoc SYB traversals of the `RenamedSource`. Also
          adds a superb type-on-hover feature (#715).
      
       * re-engineer the lexer to avoid needless string conversions. By going
          directly through GHC's `P` monad and taking bytestring slices, we
          avoid a ton of allocation and have better handling of position
          pragmas and CPP.
      
      In terms of performance, the Haddock side of things has gotten _much_
      more efficient. Unfortunately, much of this is cancelled out by the
      increased GHC workload for generating `.hie` files. For the full set of
      boot libs (including `ghc`-the-library)
      
        * the sum of total time went down by 9-10% overall
        * the sum of total allocations went down by 6-7%
      
      # Motivation
      
      Haddock is moving towards working entirely over `.hi` and `.hie` files.
      This change means we no longer need the `RenamedSource` from
      `TypecheckedModule` (something which is _not_ in `.hi` files).
      
      # Details
      
      Along the way a bunch of things were fixed:
      
       * Cross package (and other) links are now more reliable (#496)
       * The lexer tries to recover from errors on every line (instead of at CPP
          boundaries)
       * `LINE`/`COLUMN` pragmas are taken into account
       * filter out zero length tokens before rendering
       * avoid recomputing the `ModuleName`-based `SrcMap`
       * remove the last use of `Documentation.Haddock.Utf8` (see  #998)
       * restructure temporary folder logic for `.hi`/`.hie` model
      1b26460f
  19. Jan 29, 2019
Loading