title: Haskell module naming conventions
body: <p>How should I name my Haskell modules <em>for a program, not a library</em>, and <strong>organize them in a hierarchy</strong>?</p>
  
  <p>I'm making a ray tracer called Luminosity. First I had these modules:</p>
  
  <pre><code>Vector Colour Intersect Trace Render Parse Export
  </code></pre>
  
  <p>Each module was fine on it's own, but I felt like this lacked organization.</p>
  
  <p>First, I put every module under  <code>Luminosity</code>, so for example <code>Vector</code> was now <code>Luminosity.Vector</code> (I assume this is standard for a haskell program?).</p>
  
  <p>Then I thought: Vector and Colour are independent and could be reused, so they should be separated. But they're way too small to turn into libraries.</p>
  
  <p>Where should they go? There is already (on hackage) a <code>Data.Vector</code> and <code>Data.Colour</code>, so should I put them there? Or will that cause confusion (even if I import them grouped with my other local imports)? If not there, should it be <code>Luminosity.Data.Vector</code> or <code>Data.Luminosity.Vector</code>? I'm pretty sure I've seen both used, although maybe I just happened to look at a project using a nonconventional structure.</p>
  
  <p>I also have a simple TGA image exporter (<code>Export</code>) which can be independent from Luminosity. It appears the correct location would be <code>Codec.Image.TGA</code>, but again, should <code>Luminosity</code> be in there somewhere and if so, where?</p>
  
  <p>It would be nice if <a href="http://www.haskell.org/haskellwiki/Structure_of_a_Haskell_project" rel="noreferrer">Structure of a Haskell project</a> or some other wiki explained this.</p>