views:

332

answers:

2

I've just started playing around in Haskell. After years of Ruby, I got used to a file organization that's used by Ruby on Rails or Rugui.

Are there any guidelines, best practices, or maybe even frameworks about file-organization in Haskell programs?

("Learn you a Haskell" & "Real World Haskell" don't really handle this issue.)

+7  A: 

haskell.org defines two file and directory layouts that may be helpful, along with some tool guidance.

ire_and_curses
+2  A: 

The main constraint is that hierarchical module names must have hierarchical directory layout.

So Data.Map.Fast goes into Data/Map/Fast.hs

After that, decompose your programs and libraries into logical units, in separate modules, and let dependency resolution resolve the modules as needed.

Don Stewart