aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/LaTeX.hs
Commit message (Collapse)AuthorAgeFilesLines
* Context becomes a Maybe in the GHC ASTAlan Zimmerman2021-02-221-7/+9
| | | | | | This prevents noLoc's appearing in the ParsedSource. Match the change in GHC.
* Merge branch 'ghc-head' into ghc-9.0alexbiehl-gc2021-02-071-41/+68
|\
| * Merge commit '41964cb2fd54b5a10f8c0f28147015b7d5ad2c02' into wip/ghc-head-mergeBen Gamari2021-02-061-0/+1
| |\
| | * type level characters support for haddock (required for #11342)Daniel Rogozin2021-02-051-0/+1
| | |
| | * Abstract Monad for interface creationAlex Biehl2021-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found that when running as a plugin the lookupName function (which runs in Ghc monad) does not work correctly from the typeCheckResultAction hook. Instead, we abstracted the monad used when creating interfaces, so that access to GHC session specific parts is explicit and so that the TcM can provide their (correct) implementation of lookupName.
| * | Merge remote-tracking branch 'origin/ghc-9.0' into ghc-headBen Gamari2021-01-131-131/+153
| |\ \ | | |/ | |/|
| * | Adapt to HsCoreTy (formerly NewHsTypeX) becoming a type synonymRyan Scott2020-12-161-1/+1
| | | | | | | | | | | | Needed for !4417, the fix for GHC#15706 and GHC#18914.
| * | Display linear/multiplicity arrows correctly (#1238)Krzysztof Gogolewski2020-12-161-3/+11
| | | | | | | | | | | | Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b.
| * | Merge pull request #1257 from AndreasPK/wip/andreask/opt_dumpsBen Gamari2020-12-031-1/+1
| |\ \ | | | | | | | | Update for changes in GHC's Pretty
| | * | Update for changes in GHC's PrettyAndreas Klebinger2020-11-241-1/+1
| | | |
| * | | Add type arguments to PrefixConCale Gibbard2020-11-251-2/+2
| |/ /
| * | Adapt to HsOuterTyVarBndrsRyan Scott2020-10-301-21/+45
| | | | | | | | | | | | | | | These changes accompany ghc/ghc!4107, which aims to be a fix for #16762.
| * | Adapt to HsConDecl{H98,GADT}Details splitRyan Scott2020-10-301-14/+16
| | | | | | | | | | | | Needed for GHC#18844.
| * | Add whitespace in: map ($ v)Vladislav Zavialov2020-10-151-3/+3
| | |
| * | Fix after Outputable refactoringSylvain Henry2020-08-051-1/+1
| | |
| * | Update for modular ping pongZubin Duggal2020-07-231-1/+0
| | |
* | | Merge pull request #1314 from tweag/show-linear-backportHécate Moonlight2021-02-071-3/+11
|\ \ \ | | | | | | | | Backport #1238 (linear types) to ghc-9.0
| * | | Display linear/multiplicity arrows correctly (#1238)Krzysztof Gogolewski2021-02-051-3/+11
| | |/ | |/| | | | | | | | | | | | | | | | Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. (cherry picked from commit b4b4d896d2d68d6c48e7db7bfe95c185ca0709cb)
* / | Add support for labeled module referencesIñaki García Etxebarria2021-02-071-1/+6
|/ / | | | | | | | | | | | | | | | | | | Support a markdown-style way of annotating module references. For instance -- | [label]("Module.Name#anchor") will create a link that points to the same place as the module reference "Module.Name#anchor" but the text displayed on the link will be "label".
* | Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0Ben Gamari2021-01-051-134/+155
|\ \ | |/ |/|
| * Changes for GHC#17566Alex Biehl2020-12-081-1/+1
| | | | | | | | See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469
| * Use `unLoc`/`noLoc` from GHC instead of `unL`/`reL`Alec Theriault2020-03-281-1/+1
| | | | | | | | | | | | | | | | * `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
| * Use TTG empty extensions to remove some `error`'sAlec Theriault2020-03-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | 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`.
| * Clean up warningsAlec Theriault2020-03-221-8/+1
| | | | | | | | | | | | * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal`
| * Merge branch 'ghc-8.8' into ghc-8.10Alec Theriault2020-03-201-138/+168
| |\
| | * Matching changes in GHC for #16236Alan Zimmerman2019-03-291-3/+3
| | | | | | | | | | | | (cherry picked from commit 3ee6526d4ae7bf4deb7cd1caf24b3d7355573576)
| | * Many LaTeX backend fixesAlec Theriault2019-03-091-98/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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...)
| | * Avoid multi-line `emph` in LaTeX backendAlec Theriault2019-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | `markupWarning` often processes inputs which span across paragraphs. Unfortunately, LaTeX's `emph` is not made to handle this (and will crash). Fixes #936.
| | * Better support for default methods in classesAlec Theriault2019-03-091-23/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| | * Merge branch 'ghc-8.6' into ghc-8.8Alec Theriault2019-03-031-23/+30
| | |\
| | | * Keep forall on H98 existential data constructors (#1003)Alec Theriault2019-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The information about whether or not there is a source-level `forall` is already available on a `ConDecl` (as `con_forall`), so we should use it instead of always assuming `False`! Fixes #1002.
| | | * More uniform handling of `forall`'s in HTML/LaTeXAlec Theriault2018-11-261-21/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * don't forget to print explicit `forall`'s when there are arg docs * when printing an explicit `forall`, print all tyvars Fixes #973
| | * | Better identifier parsingAlec Theriault2019-02-251-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '(<|>)' 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).
* | | | Adapt Haddock to LinearTypesKrzysztof Gogolewski2020-06-171-8/+9
| | | | | | | | | | | | | | | | See ghc/ghc!852.
* | | | Use HsForAllTelescope (GHC#18235)Ryan Scott2020-06-131-12/+12
| | | |
* | | | Changes for GHC#18191Ryan Scott2020-06-051-1/+1
| | | | | | | | | | | | | | | | See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3337.
* | | | Explicit Specificity Support for HaddockGert-Jan Bottu2020-05-201-6/+19
| | | |
* | | | Module structureSylvain Henry2020-04-241-4/+4
| | | |
* | | | Make NoExtCon fields strictRyan Scott2020-04-071-8/+0
| | | | | | | | | | | | | | | | | | | | These changes are a part of a fix for [GHC#17992](https://gitlab.haskell.org/ghc/ghc/issues/17992).
* | | | Modules: TypesSylvain Henry2020-03-201-4/+4
| | | |
* | | | Changes for GHC#17566Ryan Scott2020-01-251-1/+1
|/ / / | | | | | | | | | See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469
* | | Changes for #15247Ryan Scott2019-07-031-18/+18
| | |
* | | Visible dependent quantification (#16326) changesRyan Scott2019-02-271-4/+12
| | |
* | | Matching changes in GHC for #16236Alan Zimmerman2019-02-051-3/+3
|/ /
* | Miscellaneous improvements to `Convert` (#1020)Alec Theriault2019-02-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Visible kind application haddock updatemynguyen2018-12-301-4/+18
| |
* | Refactor names + unused functions (#982)Alec Theriault2018-12-171-9/+6
| | | | | | | | | | | | | | This commit should not introduce any change in functionality! * consistently use `getOccString` to convert `Name`s to strings * compare names directly when possible (instead of comparing strings) * get rid of unused utility functions
* | [TTG: Handling Source Locations] Foundation and PatShayan-Najd2018-11-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | Trac Issues #15495 This patch removes the ping-pong style from HsPat (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A). - the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced - some instances of `HasSrcSpan` are introduced - some constructors `L` are replaced with `cL` - some patterns `L` are replaced with `dL->L` view pattern - some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`)
* | Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag changeAlp Mestanogullari2018-11-151-2/+3
| | | | | | | | It got introduced in ghc/ghc@ae2c9b40f5b6bf272251d1f4107c60003f541b62.
* | Merge branch 'ghc-8.6' into ghc-headAlec Theriault2018-11-101-5/+5
|\|