Skip to content

Make srcs :: { module_name : src_file } - #9

Merged
simonmar merged 1 commit into
masterfrom
cabal
Oct 1, 2026
Merged

simonmar merged 1 commit into
masterfrom
cabal

Conversation

@simonmar

@simonmar simonmar commented Oct 1, 2026

Copy link
Copy Markdown
Owner

This is simpler. Currently when the module name differs from the source file, we do something like

srcs = { "Main.hs" : "src/test.hs" }

but "Main.hs" is just translated into the module name by the prelude's haskell_*() rules, because it needs to know the filename that GHC will dump into -odir. So giving it the module name directly is simpler. Furthermore this lets us omit a layer of export_file() rules in _resolve_src().

This is simpler. Currently when the module name differs from the source
file, we do something like

  srcs = { "Main.hs" : "src/test.hs" }

but "Main.hs" is just translated into the module name by the prelude's
`haskell_*()` rules, because it needs to know the filename that GHC will
dump into `-odir`. So giving it the module name directly is
simpler. Furthermore this lets us omit a layer of `export_file()` rules
in `_resolve_src()`.
@simonmar
simonmar merged commit 5002778 into master Oct 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant