[commit: ghc] master: Serialize docstrings to ifaces, display them with new GHCi :doc command (85309a3)

git at git.haskell.org git at git.haskell.org
Tue Jun 5 00:45:21 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/85309a3cda367425cca727dfa45e5e6c63b47391/ghc

>---------------------------------------------------------------

commit 85309a3cda367425cca727dfa45e5e6c63b47391
Author: Simon Jakobi <simon.jakobi at gmail.com>
Date:   Mon Jun 4 17:51:03 2018 -0400

    Serialize docstrings to ifaces, display them with new GHCi :doc command
    
    If `-haddock` is set, we now extract docstrings from the renamed ast
    and serialize them in the .hi-files.
    
    This includes some of the changes from D4749 with the notable
    exceptions of the docstring lexing and renaming.
    
    A currently limited and experimental GHCi :doc command can be used
    to display docstrings for declarations.
    
    The formatting of pretty-printed docstrings is changed slightly,
    causing some changes in testsuite/tests/haddock.
    
    Test Plan: ./validate
    
    Reviewers: alexbiehl, hvr, gershomb, harpocrates, bgamari
    
    Reviewed By: alexbiehl
    
    Subscribers: rwbarton, thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D4758


>---------------------------------------------------------------

85309a3cda367425cca727dfa45e5e6c63b47391
 compiler/deSugar/Desugar.hs                        |   8 +-
 compiler/deSugar/ExtractDocs.hs                    | 344 +++++++++++++++++++++
 compiler/ghc.cabal.in                              |   1 +
 compiler/hsSyn/HsDoc.hs                            |  92 +++++-
 compiler/iface/LoadIface.hs                        |   3 +
 compiler/iface/MkIface.hs                          |  26 +-
 compiler/main/GHC.hs                               |   3 +
 compiler/main/HscTypes.hs                          |  38 ++-
 compiler/main/InteractiveEval.hs                   |  68 ++++
 compiler/typecheck/TcRnMonad.hs                    |   6 +
 docs/users_guide/8.6.1-notes.rst                   |   6 +
 docs/users_guide/ghci.rst                          |   8 +
 ghc/GHCi/UI.hs                                     |  36 +++
 mk/config.mk.in                                    |   5 +-
 .../haddock/haddock_examples/haddock.Test.stderr   |  83 ++---
 .../should_compile_flag_haddock/T11768.stderr      |   4 +-
 .../should_compile_flag_haddock/haddockA014.stderr |   2 +-
 .../should_compile_flag_haddock/haddockA015.stderr |   2 +-
 .../should_compile_flag_haddock/haddockA016.stderr |   2 +-
 .../should_compile_flag_haddock/haddockA018.stderr |   2 +-
 .../should_compile_flag_haddock/haddockA019.stderr |   2 +-
 .../should_compile_flag_haddock/haddockA020.stderr |   2 +-
 .../should_compile_flag_haddock/haddockA021.stderr |   4 +-
 .../should_compile_flag_haddock/haddockA023.stderr |   2 +-
 .../should_compile_flag_haddock/haddockA024.stderr |   2 +-
 .../should_compile_flag_haddock/haddockA025.stderr |   2 +-
 .../should_compile_flag_haddock/haddockA026.stderr |   2 +-
 .../should_compile_flag_haddock/haddockA027.stderr |   4 +-
 .../should_compile_flag_haddock/haddockA028.stderr |   2 +-
 .../should_compile_flag_haddock/haddockA029.stderr |   2 +-
 .../should_compile_flag_haddock/haddockA030.stderr |   5 +-
 .../should_compile_flag_haddock/haddockA031.stderr |   4 +-
 .../should_compile_flag_haddock/haddockA032.stderr |   6 +-
 .../should_compile_flag_haddock/haddockA034.stderr |   4 +-
 .../should_compile_flag_haddock/haddockA035.stderr |  10 +-
 .../should_compile_flag_haddock/haddockA036.stderr |  18 +-
 .../should_compile_flag_haddock/haddockA037.stderr |   4 +-
 testsuite/tests/showIface/DocsInHiFile.hs          |  37 +++
 testsuite/tests/showIface/DocsInHiFile0.stdout     |   4 +
 testsuite/tests/showIface/DocsInHiFile1.stdout     |  36 +++
 testsuite/tests/showIface/Makefile                 |   8 +
 testsuite/tests/showIface/all.T                    |   8 +
 42 files changed, 816 insertions(+), 91 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 85309a3cda367425cca727dfa45e5e6c63b47391


More information about the ghc-commits mailing list