2 ms·
If only Haskell would be more like OCaml in this regard, and would allow you to eg nest module, instead of saying "One File = One Module".
by eru 11y ago
If only Haskell would be more like OCaml in this regard, and would allow you to eg nest module, instead of saying "One File = One Module".
- lelf 11y agoIt goes in that direction with https://ghc.haskell.org/trac/ghc/wiki/Backpack https://ghc.haskell.org/trac/ghc/wiki/Backpack
- p4wnc6 11y agoI've never encountered a situation in which the One File - One Module imposed convention was problematic. I also find it greatly helps when reading new Haskell code bases. I think it's generally a sign of good project design when there are lots and lots of small files, each with one data structure and a few associated functions.
- eru 11y agoFor most of what I want, being able to introduce additional namespaces would be good enough. Making them modules as well could open the doors to some need techniques. (I don't need multiple namespaces per file so much for the finished program, but it's handy when developing.)