[Haskell-cafe] Organizing your code files

Christopher Conforti christopher at conforti.xyz
Sat Aug 7 19:18:45 UTC 2021

Hi List,
I'm a relatively new Haskeller. I've gotten the syntax of the
language more or less down, and I'm slowly expanding my vocabulary. I've
found in other languages that my coding style and how my code is
organized affect both the quality of my code and how easy it is to

'Coding style' refers to how code is organized within a block. For
foo bar baz bing = x + y * z
  = x + y * z

Code organization refers both to how code is organized within a
source file (i.e., how code blocks are arranged, how they're grouped,
so on) and how source files themselves are organized.

I've got the first part down--I've developed a code style that I'm
satisfied with, I've tried to fine-tune my style to make maximum
effective use of available space (limiting myself to 72 columns, and a
block size of no more than 30 lines) so as to force myself to extract
and abtract away unnecessary details.

The second part is the one I'm having trouble with. There are so many
ways to organize one's code that I don't even know where to begin
developing a method that I like other than to ask other Haskellers how
they do it and why they like doing it that way.

So there you have it: How do you organize your code, and why?


Christopher Conforti
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20210807/11c05af0/attachment.sig>

More information about the Haskell-Cafe mailing list