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
Showing
- compiler/deSugar/Desugar.hs 7 additions, 1 deletioncompiler/deSugar/Desugar.hs
- compiler/deSugar/ExtractDocs.hs 344 additions, 0 deletionscompiler/deSugar/ExtractDocs.hs
- compiler/ghc.cabal.in 1 addition, 0 deletionscompiler/ghc.cabal.in
- compiler/hsSyn/HsDoc.hs 90 additions, 2 deletionscompiler/hsSyn/HsDoc.hs
- compiler/iface/LoadIface.hs 3 additions, 0 deletionscompiler/iface/LoadIface.hs
- compiler/iface/MkIface.hs 22 additions, 4 deletionscompiler/iface/MkIface.hs
- compiler/main/GHC.hs 3 additions, 0 deletionscompiler/main/GHC.hs
- compiler/main/HscTypes.hs 33 additions, 5 deletionscompiler/main/HscTypes.hs
- compiler/main/InteractiveEval.hs 68 additions, 0 deletionscompiler/main/InteractiveEval.hs
- compiler/typecheck/TcRnMonad.hs 6 additions, 0 deletionscompiler/typecheck/TcRnMonad.hs
- docs/users_guide/8.6.1-notes.rst 6 additions, 0 deletionsdocs/users_guide/8.6.1-notes.rst
- docs/users_guide/ghci.rst 8 additions, 0 deletionsdocs/users_guide/ghci.rst
- ghc/GHCi/UI.hs 36 additions, 0 deletionsghc/GHCi/UI.hs
- mk/config.mk.in 4 additions, 1 deletionmk/config.mk.in
- testsuite/tests/haddock/haddock_examples/haddock.Test.stderr 43 additions, 40 deletionstestsuite/tests/haddock/haddock_examples/haddock.Test.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T11768.stderr 2 additions, 2 deletions...e/tests/haddock/should_compile_flag_haddock/T11768.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/haddockA014.stderr 1 addition, 1 deletion...ts/haddock/should_compile_flag_haddock/haddockA014.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/haddockA015.stderr 1 addition, 1 deletion...ts/haddock/should_compile_flag_haddock/haddockA015.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/haddockA016.stderr 1 addition, 1 deletion...ts/haddock/should_compile_flag_haddock/haddockA016.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/haddockA018.stderr 1 addition, 1 deletion...ts/haddock/should_compile_flag_haddock/haddockA018.stderr
Loading
Please register or sign in to comment