r/haskellquestions • • Sep 20 '25

Source files, modules, libraries, components, packages : I am confused, can someone help?

Hope this is an OK venue for my request.

I am new to Haskell and am not doing too bad with the language itself. But I am having a hard time understanding the structure of the development/distribution ecosystem. I keep reading about modules, libraries, components, and packages (not to mention source files). I have yet to see a comprehensive and clear exposition of all those concepts in one place.

Can someone explain the differences and relationships between those things, or point me to a resource that does?

Thanks!

4 Upvotes

8 comments sorted by

View all comments

Show parent comment

1

u/fridofrido Sep 22 '25

So, I'm not really up-to-date with modern Cabal, but a maybe a simple workaround would be to move the xml-light library to a separate directory, install it (since presumably you are not interested in the details of that, just pandoc itself), and then pandoc will be the only library

1

u/marxescu Sep 22 '25

Thanks, I will try something along these lines.

May I ask how you debug your Haskell projects? Ultimately, what I need to do is modify a couple of modules in Pandoc, so I will need to debug modules (the source code I will be working on) that depend on zillions of other (precompiled) packages for which I do not have (nor want) the source code. How does one go about debugging in such a context?

1

u/fridofrido Sep 23 '25

i don't really use classical debugging.

i try to test small relatively small functional units, if possible.

in emergency there is always printf style debugging (or Debug.Trace in pure code)