Question

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.)

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top