From 5d9a599c9f92e9a5ead9bde18ffebabbd8c05592 Mon Sep 17 00:00:00 2001 From: slotThe Date: Mon, 25 Oct 2021 12:35:18 +0200 Subject: [PATCH] X.D.Developing: Update Haddock introduction * The Haddock documentation is a very good resource for the general markup syntax. * Since we are very biased in favour of stack, document how to build Haddock docks with it. --- XMonad/Doc/Developing.hs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/XMonad/Doc/Developing.hs b/XMonad/Doc/Developing.hs index 75b785b7..1175b01d 100644 --- a/XMonad/Doc/Developing.hs +++ b/XMonad/Doc/Developing.hs @@ -273,8 +273,9 @@ xmonad-contrib.cabal file. There should be no warnings. * Any pure function added to the core must have QuickCheck properties precisely defining its behaviour. Tests for everything else are encouraged. -For examples of Haddock documentation syntax, have a look at other -extensions. Important points are: +For examples of Haddock documentation syntax, have a look at + +or other extensions. Important points are: * Every exported function (or even better, every function) should have a Haddock comment explaining what it does, and providing examples. @@ -291,6 +292,13 @@ extensions. Important points are: To generate and view the Haddock documentation for your extension, run +> stack haddock --no-haddock-deps + +If the builds succeeds, at the end stack should tell you where the +generated @index.html@ is located. + +Alternatively, you can run + > runhaskell Setup haddock and then point your browser to @\/path\/to\/XMonadContrib\/dist\/doc\/html\/xmonad-contrib\/index.html@.