-
Notifications
You must be signed in to change notification settings - Fork 17
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
buildDocs requires a "Main.hs" file #233
Comments
Actually, what happens, I think, is that if a module has module Main inside, but is not named Note that, on commandline, haddocks are by default generated only for library modules, not for executable's modules. I guess, I had this in mind and possible future options similar to cabal's Currently we have the @snoyberg: which would you prefer? @mgsloan Thank you for having a look at the |
I mixed up the last paragraph: IIRC, cabal insists that the module be Main and GHC insists that the file be Main.hs or Main.lhs. Anyway, the code is needed. |
@Mikolaj Please go ahead with supporting |
If there is no
Main.hs
file in the source directory, thenhaddock: No input file(s).
ends up in the stdout file.Results in:
Pinging @snoyberg for prioritization / etc. Now that I know I just need to have a "Main.hs" file, my work on https://github.com/fpco/fpco/issues/3808 is unblocked, so I don't think this is urgent.
Side note: There's also some code in
IdeSession.Cabal.configureAndBuild
which special-cases the existence ofMain.hs
/Main.lhs
. As far as I know, the particular paths used for modules shouldn't matter, so this may be a holdover from whenNamespace/Module.hs
paths were always used. However, that code seems to work fine even when there is noMain.hs
. Still, maybe worth looking into.The text was updated successfully, but these errors were encountered: