From 48c942cea745a4d400c4ca894a69fc0f5e92d39c Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Tue, 20 Nov 2007 16:15:52 +0100 Subject: A new documentation system What to see a real Haddock abuse? Here you go. Removed Documentation.hs and added a new name space: XMonad.Doc. By importing other documentation modules we may also use the synopsis in XMonad.Doc. If you believe that we should not have modules without code, well this code is not for you: just that strange -- stuff ...;) darcs-hash:20071120151552-32816-f4c08bb12ceeb931a5c82c782100d698f5efc22f.gz --- XMonad/Doc/Developing.hs | 147 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 XMonad/Doc/Developing.hs (limited to 'XMonad/Doc/Developing.hs') diff --git a/XMonad/Doc/Developing.hs b/XMonad/Doc/Developing.hs new file mode 100644 index 0000000..e23ce79 --- /dev/null +++ b/XMonad/Doc/Developing.hs @@ -0,0 +1,147 @@ +----------------------------------------------------------------------------- +-- | +-- Module : Documentation +-- Copyright : (C) 2007 Andrea Rossato +-- License : BSD3 +-- +-- Maintainer : andrea.rossato@unibz.it +-- Stability : unstable +-- Portability : portable +-- +-- This module documents the xmonad internals. +-- +-- It is intended for the advanced users who are curious about the +-- xmonad code and want an brief overview of it. +-- +-- It may be useful also for those who would like to extend xmonad. If +-- you think your extension may be useful for other users too, you may +-- consider about releasing it. +-- +-- Coding guidelines and licencing policies must be followed if you +-- want your code to be included in the official repositories. +-- +----------------------------------------------------------------------------- + +module XMonad.Doc.Developing + ( + -- * Writing new extensions + -- $writing + + -- * Libraries for writing window managers + -- $xmonad-libs + + -- * xmonad internals + -- $internals + + -- ** The @main@ entry point + -- $main + + -- ** The X monad and the internal state + -- $internalState + + -- ** Event handling and messages + -- $events + + -- ** The 'LayoutClass' + -- $layoutClass + + -- * Coding style + -- $style + + -- * Licensing policy + -- $license + ) where + +-------------------------------------------------------------------------------- +-- +-- Writing Extensions +-- +-------------------------------------------------------------------------------- + +{- $writing + +Writing Other Extensions + +-} + +{- $xmonad-libs + +xmonad and xmonad-contrib are just libraries for letting users write +their own window managers. This is what makes xmonad such a powerful +and still simple application. + +Give some examples: +arossato_vm +droundy_wm + +In the previous sections we show how simple it can be to write your +own window manager by using the core code (xmonad) and some of the +contributed code (xmonad-contrib). + +In this section we will give you a brief overview of the programming +techniques that have been used in order to make writing new extensions +very simple. + +-} + +{- $internals + +TODO + +-} + +{- $main +#The_main_entry_point# + +TODO + +-} + +{- $internalState + +TODO + +-} + +{- $events + +TODO + +-} + +{- $layoutClass +#The_LayoutClass# +TODO + +-} + +{- $style + +These are the coding guidelines for contributing to xmonad and the +xmonad contributed extensions. + +* Comment every top level function (particularly exported funtions), and + provide a type signature. + +* Use Haddock syntax in the comments. + +* Follow the coding style of the other modules. + +* Code should be compilable with -Wall -Werror. There should be no warnings. + +* Partial functions should be avoided: the window manager should not + crash, so do not 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. + +-} + +{- $license + +New modules should identify the author, and be submitted under the +same license as xmonad (BSD3 license or freer). + +-} -- cgit v1.2.3