[Haskell-cafe] Files and Modules

julian getcontented.com.au julian at getcontented.com.au
Mon Dec 2 14:22:03 UTC 2024


Thanks. Understood about the Linker. I was thinking the linking could be some final phase that was separated out in such a way that would still be compatible with the file system (a HasLinker constraint? ;-) j/k).

But to go back to what you were saying, if we had the ability to decouple modules from files it would mean I could set up a notion of dependency between the modules that I have stored in Texts in such a way that I wouldn’t need to repeat code between the Texts when I want to share code as I’m compiling chunks of it. At the moment I try hard to keep the set of common items shared between all the code I have because it makes it simpler to manage and keeps duplication low, and it also means the call to stack that I have only has to include a small set of packages and can be common between all the combined sets of code I have.


On 2 Dec 2024, at 11:00 PM, haskell-cafe-request at haskell.org wrote:

One compromise GHC could make would be abstract the notion of module
from the Haskell source (multiple modules per file, no file involved at
all), but ultimately as Brandon says, the file system has to get
involved for the linker, so the concept of a module needs to remain
compatible with the action of writing it as a file.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20241202/8816d030/attachment.html>


More information about the Haskell-Cafe mailing list