From 8f60325f2f4e0dcbf4562f9cea05fe7bbc86d0e3 Mon Sep 17 00:00:00 2001 From: gwern0 Date: Tue, 8 Jul 2008 22:50:58 +0200 Subject: XMonad/Doc/Developing.hs: update haddock ln, cpedit darcs-hash:20080708205058-f7719-ab1457e039ca92227599d24808883fe34543cb6b.gz --- XMonad/Doc/Developing.hs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'XMonad/Doc/Developing.hs') diff --git a/XMonad/Doc/Developing.hs b/XMonad/Doc/Developing.hs index 60796a8..714b930 100644 --- a/XMonad/Doc/Developing.hs +++ b/XMonad/Doc/Developing.hs @@ -211,7 +211,7 @@ generated by layouts or the user. "XMonad.Core" defines a class that generalizes the concept of events, 'XMonad.Core.Message', constrained to types with a 'Data.Typeable.Typeable' instance definition (which can be -automatically derived by ghc). 'XMonad.Core.Message's are wrapped +automatically derived by GHC). 'XMonad.Core.Message's are wrapped within an existential type 'XMonad.Core.SomeMessage'. The 'Data.Typeable.Typeable' constraint allows for the definition of a 'XMonad.Core.fromMessage' function that can unwrap the message with @@ -253,21 +253,22 @@ xmonad contributed extensions. * Follow the coding style of the other modules. -* Code should be compilable with -Wall -Werror. There should be no warnings. +* Code should be compilable with "ghc-options: -Wall -Werror" set in the +xmonad-contrib.cabal file. There should be no warnings. * Partial functions should be avoided: the window manager should not - crash, so do not call 'error' or 'undefined'. + crash, so never call 'error' or 'undefined'. * Tabs are /illegal/. Use 4 spaces for indenting. -* Any pure function added to the core should have QuickCheck properties - precisely defining its behaviour. +* 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: * Every exported function (or even better, every function) should have - a Haddock comment explaining what it does. + a Haddock comment explaining what it does, and providing examples. * Literal chunks of code can be written in comments using \"birdtrack\" notation (a greater-than symbol at the beginning of @@ -286,7 +287,7 @@ To generate and view the Haddock documentation for your extension, run and then point your browser to @\/path\/to\/XMonadContrib\/dist\/doc\/html\/xmonad-contrib\/index.html@. For more information, see the Haddock documentation: -. +. For more information on the nuts and bolts of how to develop your own extension, see the tutorial on the wiki: -- cgit v1.2.3