[Haskell-cafe] Software architecture

2010-08-04 Thread Charles-Pierre Astolfi
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@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Software architecture

2010-08-04 Thread Chris Eidhof
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@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Software architecture

2010-08-04 Thread Christopher Done
This came up a month or so ago, Don Stewart and others overviewed this
topic in detail:

http://www.haskell.org/pipermail/haskell-cafe/2010-May/077154.html

On 4 August 2010 13:07, Charles-Pierre Astolfi c...@crans.org 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@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe