Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8272049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:00:39+00:00 2026-06-08T07:00:39+00:00

How should I name my Haskell modules for a program, not a library ,

  • 0

How should I name my Haskell modules for a program, not a library, and organize them in a hierarchy?

I’m making a ray tracer called Luminosity. First I had these modules:

Vector Colour Intersect Trace Render Parse Export

Each module was fine on it’s own, but I felt like this lacked organization.

First, I put every module under Luminosity, so for example Vector was now Luminosity.Vector (I assume this is standard for a haskell program?).

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.

Where should they go? There is already (on hackage) a Data.Vector and Data.Colour, 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 Luminosity.Data.Vector or Data.Luminosity.Vector? I’m pretty sure I’ve seen both used, although maybe I just happened to look at a project using a nonconventional structure.

I also have a simple TGA image exporter (Export) which can be independent from Luminosity. It appears the correct location would be Codec.Image.TGA, but again, should Luminosity be in there somewhere and if so, where?

It would be nice if Structure of a Haskell project or some other wiki explained this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:00:40+00:00Added an answer on June 8, 2026 at 7:00 am

    First of all I put every module under Luminosity

    I think this was a good move. It clarifies to anyone that is reading the code that these modules were made specifically for the Luminosity project.

    If you write a module with the intent of simulating or improving upon an existing library, or of filling a gap where you believe a particular generic library is missing, then in that rare case, drop the prefix and name it generically. For an example of this, see how the pipes package exports Control.Monad.Trans.Free, because the author was, for whatever reason, not satisfied with existing implementations of Free monads.

    Then I thought, Vector and Colour are pretty much independent and could be reused, so they should be separated. But they’re way to small to separate off into a library (125 and 42 lines respectively). Where should they go?

    If you don’t make a separate library, then probably leave them at Luminosity.Vector and Luminosity.Colour. If you do make separate libraries, then try emailing the target audience of those libraries and see how other people think these libraries should be named and categorized. Whether or not you split these out into separate libraries is entirely up to you and how much benefit you think these separate libraries might provide for other people.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to validate file name with following pattern.... File name(string) should not be
not sure how i should name the title of the post. i'm having a
I am not sure exactly what I should name this question. I just started
Should the name of command line options for a program in a POSIX-style operating
The name 'MenuItems_Click' does not exist in the current context. Should I name it
the customer, do I prevent the customer's name should not be the same as
Sometimes it would be useful to name variables like no programmer should name his
What should I name my class that stores costs/prices/amounts of money in CAD/USD as
I have chat list view in which sender name should be left aligned and
When the user enters his/her MerryParentEmail address, the corresponding name should be fetched fr

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.