aboutsummaryrefslogtreecommitdiff
path: root/haddock-library/src/Documentation/Haddock/Parser
Commit message (Collapse)AuthorAgeFilesLines
* fix parsing trailing quotes in backticked identifiers (#1408) (#1483)Artem Pelenitsyn2022-05-081-2/+2
|
* Follow hlint, remove language pragmas in libs. (#1478)Phil de Joux2022-05-032-3/+0
|
* typos (#1464)askeblad2022-03-161-1/+1
|
* Fix crash in `haddock-library` on unicode spaceAlec Theriault2020-03-271-7/+7
| | | | | | | | | | | | | 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
* Fix build-failure regression for base < 4.7Herbert Valerio Riedel2019-12-082-28/+3
| | | | | | | | | | | | | 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
* Release haddock-2.23, haddock-library-1.8.0Alec Theriault2019-05-261-5/+5
| | | | | Tentatively adjust bounds and changelogs for the release to be bundled with GHC 8.8.1.
* Better identifier parsingAlec Theriault2019-02-252-1/+198
| | | | | | | | | | | | | | | | * '(<|>)' 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).
* Faster 'Text' driven parser combinatorsAlec Theriault2018-11-052-21/+67
| | | | | | | | Perf only change: * use 'getParserState'/'setParserState' to make 'Text'-optimized parser combinators * minimize uses of 'Data.Text.{pack,unpack,cons,snoc}'
* Build on 7.4 and 7.8Alec Theriault2018-10-161-1/+2
|
* Replace 'attoparsec' with 'parsec' (#799)Alec Theriault2018-04-252-195/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove attoparsec with parsec and start fixing failed parses * Make tests pass * Fix encoding issues The Haddock parser no longer needs to worry about bytestrings. All the internal parsing work in haddock-library happens over 'Text'. * Remove attoparsec vendor * Fix stuff broken in 'attoparsec' -> 'parsec' * hyperlinks * codeblocks * examples Pretty much all issues are due to attoparsec's backtracking failure behaviour vs. parsec's non-backtracking failure behaviour. * Fix small TODOs * Missing quote + Haddocks * Better handle spaces before/after paragraphs * Address review comments
* Remove bang patternAlec Theriault2018-03-021-3/+3
|
* Support unicode operators, proper modulesAlec Theriault2018-03-021-2/+23
| | | | | | | | Unicode operators are a pretty big thing in Haskell, so supporting linking them seems like it outweighs the cost of the extra machinery to force Attoparsec to look for unicode. Fixes #458.
* Consequently use inClass and notInClass in haddock-library (#617)Alex Biehl2017-05-131-3/+6
| | | These allow attoparsec to do some clever lookup optimization
* Make parser state a newtypeDavid Feuer2016-05-241-1/+1
| | | | | | Previously, it was `data` wrapping a `Maybe`, which seems a bit silly. Obviously, this can be changed back if anyone wants to add more fields some day.
* (wip) Add support for @since (closes #26)Simon Hengel2014-11-161-6/+27
|
* newtype-wrap parser monadSimon Hengel2014-11-082-1/+129
|
* Add support for markdown links (closes #336)Simon Hengel2014-11-031-8/+10
|
* Compatibility with older versions of base and bytestringSimon Hengel2014-06-181-1/+18
|
* Move parser + parser tests out to own package.Mateusz Kowalczyk2014-05-051-0/+61
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.