-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default main
to Main
in executables
#436
Comments
@sol: Is this a feature you would want / accept? |
For me there are a couple of open questions that I currently don't have the time to look into (none exhaustive):
|
Each executable section that does not supply
Not sure. I would have to understand conditionals first. There isn't much documentation on them, at least TheFourShowcases do not use them a lot. In a minimal implementation, one could abstain from the features if conditionals appear in executables or vice versa, this would probably still serve the other 99%.
Dunno, a MVP might not have to.
It seems that DRY is the philosophy/religion of |
@andreasabel, @sol, |
@mpilgrem would you be ok to do a proof of concept before I make a final call? Things I would like to have answeredDogfeed it on hpack itselfLine 57 in bb472cc
Presumably we can remove this line. Is that an improvement? What error messages does Cabal produce if there is no
|
main: Spec.hs |
What does Cabal feedback to the user if you remove this line?
Even with this questions answered I'm still 50-50. Hpack does not promote conventions. That's the reason why we e.g. don't default NB: Note that personally I think conventions can be a good thing, and the defaults mechanism of |
I guess this should be added to the design principles. Something along the lines of "Hpack is universal. It does not promote any particular set of conventions.". |
On error messages:
|
Currently, if the user does not specify a
main:
in anexecutable
section, they get an invalid.cabal
file, sincemain-is
is missing then.Suggestion: default
main:
toMain
.Presumably, this should be done at the very end of the inference process to not interfere with #188, for instance. Only if just before writing the
.cabal
file we don't have amain
, supplymain-is: Main
.The text was updated successfully, but these errors were encountered: