Difference between revisions of "How to write a Haskell program"

From HaskellWiki
Jump to navigation Jump to search
(notes)
(more notes)
Line 39: Line 39:
 
Monad transformers are very useful for programming in the large,
 
Monad transformers are very useful for programming in the large,
 
encapsulating state, and controlling side effects.
 
encapsulating state, and controlling side effects.
  +
  +
== Publicity ==
  +
  +
* Announce your project releases to haskell@haskell.org! This ensure it will then make it into the [http://haskell.org/haskellwiki/HWN Haskell Weekly News].
  +
  +
* Blog about it, on [http://planet.haskell.org Planet Haskell]
  +
  +
* Add your library or tool to the [[Libraries and tools]] page, so people can find it.
   
 
[[Category:Community]]
 
[[Category:Community]]

Revision as of 01:58, 25 October 2006

A guide to the best practice for creating a new Haskell project or program.

Licenses

Library code for the base libraries must be BSD licensed. Otherwise, it is your call. Choose a licence (inspired by this). Check licence of things you use, both other Haskell packages and C libraries. Use same as related where possible. Haskell community is split into 2 camps, roughly, those who release everything under BSD, and GPLers. We recommend avoiding LGPL, due to cross module optimisation issues.

Revision control

Use Darcs unless you hve a specific reason not to. Almost all new Haskell projects are released under Darcs, and this benefits everyone -- a set of common tools increases productivity, and you're more likely to get patches.

Advice:

  • Tag each release
  • Make sure you also release tarballs, darcs dist can do this automatically

Build system

Ues Cabal.

Documentation

Use Haddock.

Testing

Pure code can be tested using QuickCheck. Impure code with HUnit.

Program structure

Monad transformers are very useful for programming in the large, encapsulating state, and controlling side effects.

Publicity

  • Announce your project releases to haskell@haskell.org! This ensure it will then make it into the Haskell Weekly News.