aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
Commit message (Collapse)AuthorAgeFilesLines
* Move sources under haddock-api/srcMateusz Kowalczyk2014-08-2327-9267/+0
|
* ghc 7.8.2 compatibilityLuite Stegeman2014-08-222-2/+19
|
* Move Haddock API to a separate packageSimon Hengel2014-08-221-1/+8
|
* Fix #313 by doing some list munging.Mateusz Kowalczyk2014-08-153-6/+8
| | | | | | I get rid of the Monoid instance because we weren't satisfying the laws. Convenience of having <> didn't outweigh the shock-factor of having it behave badly.
* Revert "Replace local `die` by new `System.Exit.die`"Mateusz Kowalczyk2014-08-141-1/+5
| | | | This reverts commit 08aa509ebac58bfb202ea79c7c41291ec280a1c5.
* Revert "Propagate overloading-mode for instance declarations in haddock (#9242)"Mateusz Kowalczyk2014-08-141-6/+2
| | | | This reverts commit 8d20ca8d5a9bee73252ff2035ec45f9c03d0820c.
* Revert "Adapt to new definition of HsDecls.TyFamEqn"Mateusz Kowalczyk2014-08-144-26/+16
| | | | This reverts commit cb96b4f1ed0462b4a394b9fda6612c3bea9886bd.
* Revert "Track GHC PackageId to PackageKey renaming."Mateusz Kowalczyk2014-08-148-25/+25
| | | | This reverts commit 8ac42d3327473939c013551750425cac191ff0fd.
* Revert "Track changes for module reexports."Mateusz Kowalczyk2014-08-141-3/+2
| | | | This reverts commit b99b57c0df072d12b67816b45eca2a03cb1da96d.
* Revert "Track type signature change of lookupModuleInAllPackages"Mateusz Kowalczyk2014-08-141-3/+6
| | | | This reverts commit d59fec2c9551b5662a3507c0011e32a09a9c118f.
* Bump down the version for master to 2.14.4Mateusz Kowalczyk2014-08-141-1/+1
|
* Track type signature change of lookupModuleInAllPackagesEdward Z. Yang2014-08-051-6/+3
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Track changes for module reexports.Edward Z. Yang2014-07-251-2/+3
| | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs
* Track GHC PackageId to PackageKey renaming.Edward Z. Yang2014-07-218-25/+25
| | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs
* Adapt to new definition of HsDecls.TyFamEqnSimon Peyton Jones2014-07-144-16/+26
| | | | | This is a knock-on from the refactoring from Trac #9063. I'll push the corresponding changes to GHC shortly.
* Propagate overloading-mode for instance declarations in haddock (#9242)Iavor S. Diatchki2014-07-011-2/+6
|
* Fix anchors. Closes #308.Mateusz Kowalczyk2014-06-251-1/+6
|
* Follow change in patSynSigSimon Peyton Jones2014-06-061-2/+2
|
* Revert "Revert "Accomodate change in PatSyn representation""Mateusz Kowalczyk2014-05-291-1/+1
| | | | | | | This reverts commit e110e6e70e40eed06c06676fd2e62578da01d295. Apparently as per GHC commit ac2796e6ddbd54c5762c53e2fcf29f20ea162fd5 this was actually intended. Embarrasing for me.
* Revert "Accomodate change in PatSyn representation"Mateusz Kowalczyk2014-05-291-1/+1
| | | | | | This reverts commit 57aa591362d7c8ba21285fccd6a958629a422091. I am reverting this because I pushed it to master when it was meant to stay on a wip-branch. Sorry Gergo and everyone who had trouble due to this.
* Accomodate change in PatSyn representationDr. ERDI Gergo2014-05-251-1/+1
|
* Remove no longer necessary parser error handling.Mateusz Kowalczyk2014-05-064-142/+103
| | | | | We can now drop some Maybe tests and even lets us strip an error handling monad away in a few places.
* Move parser + parser tests out to own package.Mateusz Kowalczyk2014-05-057-713/+49
| | | | | | | | | | We move some types out that are necessary as well and then re-export and specialise them in the core Haddock. Reason for moving out spec tests is that if we're working on the parser, we can simply work on that and we can ignore the rest of Haddock. The downside is that it's a little inconvenient if at the end of the day we want to see that everything passes.
* Prepare modules for parser split.Mateusz Kowalczyk2014-05-057-155/+193
| | | | | We have to generalise the Doc (now DocH) slightly to remove the dependency on GHC-supplied type.
* Replace local `die` by new `System.Exit.die`Herbert Valerio Riedel2014-04-211-5/+1
| | | | | | | | | | | | | Starting with GHC 7.10, System.Exit exports the new `die` which is essentially the same as Haddock.Util.die, so this commit changes Haddock.Util.die to be a simple re-export of System.Exit.die. See also https://ghc.haskell.org/trac/ghc/ticket/9016 for more details. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* remove Origin flag from LHsBindsLRDr. ERDI Gergo2014-04-131-8/+8
|
* Parse identifiers with ^ and ⋆ in them.Mateusz Kowalczyk2014-04-111-1/+9
| | | | Fixes #298.
* Crash when exporting record selectors of data family instancesNiklas Haas2014-03-311-10/+24
| | | | | | | | | | | | | | | | | | | This fixes bug #294. This also fixes a related but never-before-mentioned bug about the display of GADT record selectors with non-polymorphic type signatures. Note: Associated data type constructors fail to show up if nothing is exported that they could be attached to. Exporting any of the data types in the instance head, or the class + data family itself, causes them to show up, but in the absence of either of these, exporting just the associated data type with the constructor itself will result in it being hidden. The only scenario I can come up that would involve this kind of situation involved OverlappingInstances, and even then it can be mitigated by just exporting the class itself, so I'm not going to solve it since the logic would most likely be very complicated.
* Drop leading whitespace in @-style blocks.Mateusz Kowalczyk2014-03-311-3/+28
| | | | Fixes #201.
* Print kind signatures on GADTsMateusz Kowalczyk2014-03-311-6/+10
|
* Fix issue #281Niklas Haas2014-03-152-10/+14
| | | | | | | | | This is a regression from the data family instances change. Data instances are now distinguished from regular lists by usage of the new class "inst", and the style has been updated to only apply to those. I've also updated the appropriate test case to test this a bit better, including GADT instances with GADT-style records.
* Hide minimal definition for only-method classesNiklas Haas2014-03-151-1/+6
| | | | | | | Previously this was not covered by the All xs check since here it is not actually an All, rather a single Var n. This also adds the previously missing html-test/src/Minimal.hs.
* Display minimal complete definitions for type classesNiklas Haas2014-03-139-30/+78
| | | | | | | | | This corresponds to the new {-# MINIMAL #-} pragma present in GHC 7.8+. I also cleaned up some of the places in which ExportDecl is used to make adding fields easier in the future. Lots of test cases have been updated since they now render with minimality information.
* Add UnicodeSyntax alternatives for * and ->Niklas Haas2014-03-131-2/+7
| | | | | | | I could not find a cleaner way to do this other than checking for string equality with the given built-in types. But seeing as it's actually equivalent to string rewriting in GHC's implementation of UnicodeSyntax, it's probably fitting.
* Hide RHS of TFs with non-exported right hand sidesNiklas Haas2014-03-136-12/+13
| | | | | | Not sure what to do about data families yet, since technically it would not make a lot of sense to display constructors that cannot be used by the user.
* Revert "Reorder topDeclElem to move the source/wiki links to the top"Niklas Haas2014-03-111-1/+1
| | | | | | | This reverts commit 843c42c4179526a2ad3526e4c7d38cbf4d50001d. This change is no longer needed with the new rendering style, and it messes with copy/pasting lines.
* Filter family instances of hidden typesNiklas Haas2014-03-111-4/+11
| | | | | Currently, this check does not extend to hidden right hand sides, although it probably should hide them in that case.
* Update appearance of fixity annotationsNiklas Haas2014-03-111-17/+25
| | | | | | | This moves them in-line with their corresponding lines, similar to a presentation envision by @hvr and described in #ghc. Redundant operator names are also omitted when no ambiguity is present.
* Include fixity information in the Interface fileNiklas Haas2014-03-114-30/+40
| | | | | | This resolves fixity information not appearing across package borders. The binary file version has been increased accordingly.
* Group similar fixities togetherNiklas Haas2014-03-091-3/+10
| | | | | Identical fixities declared for the same line should now render using syntax like: infix 4 <, >=, >, <=
* Differentiate between TH splices (line-links) and regular namesNiklas Haas2014-03-0910-138/+178
| | | | | | | | | | | | | | | | | This adds a new type of source code link, to a specific line rather than a specific declaration/name - this is used to link to the location of a TH splice that defines a certain name. Rather hefty changes throughout and still one unresolved issue (the line URLs aren't parsed from the third form of --read-interface which means they're currently restricted to same-interface links). Not sure if this issue is really worth all the hassle, especially since we could just use line links in general. This commit also contains some cleanup/clarification of the types in Haddock.Backends.Xhtml.Decl and shortens some overlong lines in the process. Notably, the Bool parameter was replaced by a Unicode type synonym to help clarify its presence in type signatures.
* Use optLast instead of listToMaybe for sourceUrls/wikiUrlsNiklas Haas2014-03-091-7/+6
| | | | | | This lets you override them using eg. cabal haddock --haddock-options, which can come in handy if you want to use a different layout or URL for your source code links than cabal-install generates.
* Reorder topDeclElem to move the source/wiki links to the topNiklas Haas2014-03-091-1/+1
| | | | | They appear in the same position due to the float: right attribute but now they're always at the top of the box instead of at the bottom.
* Render fixity informationNiklas Haas2014-03-088-102/+182
| | | | | | Affects functions, type synonyms, type families, class names, data type names, constructors, data families, associated TFs/DFs, type synonyms, pattern synonyms and everything else I could think of.
* Change rendering of duplicate record field docsMateusz Kowalczyk2014-02-271-1/+2
| | | | | | | | See Haddock Trac #195. We now change this behaviour to only rendering the documentation attached to the first instance of a duplicate field. Perhaps we could improve this by rendering the first instance that has documentation attached to it but for now, we'll stick with this.
* Fix rendering of Contents when links are presentMateusz Kowalczyk2014-02-244-22/+37
| | | | Fixes Haddock Trac #267.
* Lower precedence of equality constraintsNiklas Haas2014-02-231-1/+1
| | | | | | | This drops them to the new precedence pREC_CTX, which makes single eqaulity constraints show up as (a ~ b) => ty, in line with GHC's rendering. Additional tests added to make sure other type operators render as intended. Current behavior matches GHC
* Make ImplicitParams render correctly (#260)Niklas Haas2014-02-232-8/+13
| | | | | | This introduces a new precedence level for single contexts (because implicit param contexts always need parens around them, but other types of contexts don't necessarily, even when alone)
* Don't shadow ‘strip’.Mateusz Kowalczyk2014-02-231-4/+4
| | | | -Wall complains
* Turn a source code comment into specsSimon Hengel2014-02-221-2/+0
|