[Haskell-cafe] Haskell and the Software design process

Don Stewart dons at galois.com
Sun May 2 16:10:09 EDT 2010


jaco.van.iterson:
> Hi
> 
> I was just wondering what methods are best to design/model the software in
> bigger projects when you are planning to use Haskell.
> Is there no difference compared to other languages? Are there any Haskell
> tools?
> 

I don't believe anyone has written a "Programming Haskell in the Large"
book (or any other similar functional language??), but there is lots of
experience in this community working on big, long lived code bases.

Some key points:

    * reduce the interactions between components by relying on pure interfaces
    * use types to encode the design into a machine checkable form
    * use QuickCheck and HPC to ensure property driven development and good coverage
    * use Hackage packages 
    * use purely functional data structures to model key parts of the
      world you're talking to. Model-driven design with easy to verify logic
    * picking a good data type (like a zipper) will make hundreds of
          unit tests meaningless -- improving productivity.
    * ensure components have 'axiomatic' interfaces -- reduce complexity
          by avoiding redundancy
    * if at all possible ensure your core algorithms and logic are
      referentially transparent -- this will dramatically simplify
      maintainanace and QA effort
    * Use GHC -Wall, QuickCheck , -fhpc, and retainer profiling to
      ensure space invariants.
    * Run a set of QC properties on every commit.
    * Avoid partial functions
    * Avoid side effecting code
    * Every bug should be mirrored as a property or type assertion.


More information about the Haskell-Cafe mailing list