[Haskell-cafe] Software architecture

Chris Eidhof chris at eidhof.nl
Wed Aug 4 08:22:49 EDT 2010


I think the general process is the same. You define your components, try to decouple them as much as possible and implement them. One thing that is different from other languages: try to write as much pure code as possible. This is great for creating composable components.

There are several different ways to structure your programs. The Utrecht Haskell Compiler is structured using attribute grammars, which is (similar to) aspect-oriented programming.

Another architectural pattern you see a lot is that a program is provided as a library and a very small main function. A very good example of this is XMonad.

You could also look at http://www.haskell.org/haskellwiki/Haskell_in_industry, which gives some pointers to commercial projects and how they are structured.

-chris

On 4 aug 2010, at 13:07, Charles-Pierre Astolfi wrote:

> Hey there,
> 
> I'm searching for software designs in Haskell ; for example, I have a
> pretty good ideo of how I would arrange my modules/classes (in
> ocaml/(java/c++)) and how they would all fit together to create, say,
> a website aspirator. But I don't have any clue of the right way to do
> it with Haskell.
> 
> I don't need a solution for this example, I'd just like to see how to
> manage non-trivial code. I haven't found any pointers on the
> interwebs.
> 
> On an unrelated note, what is the simplest way to get the llvm
> bitcode? I understand I can compile myself ghc but it there an easier
> way?
> 
> Thanks a lot!
> --
> Cp
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list