aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/LaTeX.hs
Commit message (Collapse)AuthorAgeFilesLines
* Support hyperlink labels with inline markupAlec Theriault2018-11-061-3/+3
| | | | The parser for pictures hasn't been properly adjusted yet.
* Set UTF-8 encoding before writing files (#934)Alec Theriault2018-10-161-2/+2
| | | | | This should fix #929, as well as guard against future problems of this sort in other places. Basically replaces 'writeFile' (which selects the users default locale) with 'writeUtf8File' (which always uses utf8).
* Better rendering of unboxed sums/tuplesAlec Theriault2018-08-211-2/+2
| | | | | * adds space after/before the '#' marks * properly reify 'HsSumTy' in 'synifyType'
* Latex type families (#734)Alec Theriault2018-08-041-24/+107
| | | | | | | | | | | | | | | | | | | | * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests
* Refactor handling of parens in types (#874)Alec Theriault2018-07-201-76/+47
| | | | | | | | | | | | | | | | | | | | | | | | * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes #873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes #877. * Accept HTML output for quantified contexts test
* Remove HsEqTy and XEqTyRyan Scott2018-06-191-5/+1
|
* Handle -XStarIsTypeVladislav Zavialov2018-06-141-4/+3
|
* Fix redundant import warningsSimon Jakobi2018-06-131-1/+1
|
* Remove ParallelArrays and Data Parallel HaskellBen Gamari2018-06-131-5/+0
|
* Account for refactoring of LitStringBen Gamari2018-06-131-9/+1
|
* Merge branch 'ghc-head' with 'ghc-8.4'Herbert Valerio Riedel2018-05-011-297/+305
|\
| * Match changes in GHC for TTGAlan Zimmerman2018-04-271-20/+23
| |
| * Match GHC for TTG implemented on HsBinds, D4581Alan Zimmerman2018-04-131-12/+12
| |
| * Match GHC changes for TTGAlan Zimmerman2018-04-091-26/+26
| |
| * Constructor and pattern synonym argument docs (#709)Alec Theriault2018-01-131-206/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support Haddocks on constructor arguments This is in conjunction with https://phabricator.haskell.org/D4094. Adds support for rendering Haddock's on (non-record) constructor arguments, both for regular and GADT constructors. * Support haddocks on pattern synonym arguments It appears that GHC already parsed these - we just weren't using them. In the process of doing this, I tried to deduplicate some code around handling patterns. * Update the markup guide Add some information about the new support for commenting constructor arguments, and mention pattern synonyms and GADT-style constructors. * Overhaul LaTeX support for data/pattern decls This includes at least * fixing several bugs that resulted in invalid LaTeX * fixing GADT data declaration headers * overhaul handling of record fields * overhaul handling of GADT constructors * overhaul handling of bundled patterns * add support for constructor argument docs * Support GADT record constructors This means changes what existing HTML docs look like. As for LaTeX, looks like GADT records were never even supported. Now they are. * Clean up code/comments Made code/comments consistent between the LaTeX and XHTML backend when possible. * Update changelog * Patch post-rebase regressions * Another post-rebase change We want return values to be documentable on record GADT constructors.
| * Track changes to follow Trac #14529Simon Peyton Jones2017-12-071-70/+4
| | | | | | | | This tracks the refactoring of HsDecl.ConDecl.
* | Show where instances are defined (#748)Alec Theriault2018-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Indicate source module of instances Above instance, we now also display a link to the module where the instance was defined. This is sometimes helpful in figuring out what to import. * Source module for type/data families too * Remove parens * Accept tests
* | Hoogle/Latex: Remove use of partial functionAlexander Biehl2018-02-191-6/+4
| |
* | Grid Tables (#718)Oleg Grenrus2018-02-011-1/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in https://github.com/haskell/haddock/pull/577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example
* Revert "Match changes for Trees that Grow in GHC"Ben Gamari2017-11-211-25/+25
| | | | This reverts commit 01eeeb048acd2dd05ff6471ae148a97cf0720547.
* Revert "Clean up use of PlaceHolder, to match TTG"Ben Gamari2017-11-211-1/+1
| | | | This reverts commit 134a7bb054ea730b13c8629a76232d73e3ace049.
* Clean up use of PlaceHolder, to match TTGAlan Zimmerman2017-11-141-1/+1
|
* Match changes for Trees that Grow in GHCAlan Zimmerman2017-11-071-25/+25
|
* Overhaul Haddock's rendering of kind signatures (#681)Ryan Scott2017-10-241-8/+8
| | | | | | | | | | | | | | | * Overhaul Haddock's rendering of kind signatures * Strip off kind signatures when specializing As an added bonus, this lets us remove an ugly hack specifically for `(->)`. Yay! * Update due to 0390e4a0f61e37bd1dcc24a36d499e92f2561b67 * @alexbiehl's suggestions * Import injectiveVarsOfBinder from GHC
* Make compatible with Prelude.<> export in GHC 8.4/base-4.11Herbert Valerio Riedel2017-09-211-0/+1
|
* Merge remote-tracking branch 'origin/master' into ghc-headalexbiehl2017-08-211-8/+25
|\
| * Move `DocMarkup` from haddock-api to haddock-library (#659)Alexander Biehl2017-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | * Move `DocMarkup` from haddock-api to haddock-library * Move more markup related functions * Markup module * CHANGELOG
| * Haddock support for bundled pattern synonyms (#627)Christiaan Baaij2017-06-091-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Haddock support for bundled pattern synonyms * Add fixities to bundled pattern synonyms * Add bundled pattern synonyms to the synopsis * Store bundled pattern fixities in expItemFixities * Add test for bundled pattern synonyms * Stop threading fixities * Include bundled pattern synonyms for re-exported data types Sadly, fixity information isn't found for re-exported data types * Support for pattern synonyms * Modify tests after #631 * Test some reexport variations * Also lookup bundled pattern synonyms from `InstalledInterface`s * Check isExported for bundled pattern synonyms * Pattern synonym is exported check * Always look for pattern synonyms in the current module Another overlooked cornercase * Account for types named twice in export lists Also introduce a fast function for nubbing on a `Name` and use it throughout the code base. * correct fixities for reexported pattern synonyms * Fuse concatMap and map * Remove obsolete import * Add pattern synonyms to visible exports * Fix test * Remove corner case
* | Match new AST as per GHC wip/new-tree-one-paramAlan Zimmerman2017-06-051-47/+47
|/ | | | See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow
* HsIParamTy now has a Located nameAlan Zimmerman2017-01-101-1/+1
|
* Match changes in GHC wip/T3384 branchAlan Zimmerman2016-12-071-2/+4
|
* Add support for unboxed sumsÖmer Sinan Ağacan2016-07-211-0/+5
|
* GhcUtils: Changes for multi-pattern signaturesBen Gamari2016-07-011-6/+6
|
* Render Haddocks for derived instancesRyan Scott2016-05-041-0/+1
| | | | | | | | | | Currently, one can document top-level instance declarations, but derived instances (both those in `deriving` clauses and standalone `deriving` instances) do not enjoy the same privilege. This makes the necessary changes to the Haddock API to enable rendering Haddock comments for derived instances. This is part of a fix for Trac #11768.
* Changes due to fix for GHC#11648.Richard Eisenberg2016-03-141-1/+1
|
* Merge remote-tracking branch 'idontgetoutmuch/ghc-head' into ghc-headBen Gamari2015-12-251-0/+6
|\
| * Fix the documentation for haddock itself.Dominic Steinitz2015-12-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs
| * Handle inline math with mathjax.Dominic Steinitz2015-12-211-0/+3
| |
* | Follow removal of NamedWildCard from HsTypeSimon Peyton Jones2015-12-221-2/+0
| |
* | Update for GHC trac#11258Alan Zimmerman2015-12-201-1/+1
|/ | | | Adding locations to RdrName in FieldOcc and AmbiguousFieldOcc
* WarningsMatthew Pickering2015-12-141-2/+1
|
* Update for type=kindsRichard Eisenberg2015-12-141-4/+5
|
* Matching changes for #11028Alan Zimmerman2015-12-141-3/+68
|
* Update to match GHC wip/T11019Alan Zimmerman2015-12-141-2/+2
|
* More adaption to wildcard-refactorSimon Peyton Jones2015-12-141-1/+1
|
* Work on updating Haddock to wip/spj-wildard-recactorSimon Peyton Jones2015-12-141-87/+56
| | | | Still incomplete
* Roughly fix up haddock for DuplicateRecordFields changesAdam Gundry2015-12-141-4/+7
| | | | | This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used.
* HsBang is split into HsSrcBang and HsImplBangAdam Sandberg Eriksson2015-12-141-3/+1
| | | | | With recent changes in GHC handling of strictness annotations in Haddock is simplified.
* StrictData: changes in HsBang typeAdam Sandberg Eriksson2015-12-141-5/+5
|
* StrictData: print correct strictness marksAdam Sandberg Eriksson2015-12-141-2/+5
|