-
Notifications
You must be signed in to change notification settings - Fork 710
Concatenation of mains from conditional branches #6973
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
Comments
Investigating slightly further:
|
Duplicate of #3313 A workaround is to have dummy module Main (main) where
import RealMain (main) and put main-is: Main.hs
-- most sources are here
hs-source-dirs: src/
-- but RealMain has multiple implementations:
if os(windows)
hs-source-dirs: windows/
If os(linux)
hs-source-dirs: linux/
other-modules: RealMain
... |
Ah thanks, I did do a quick search but missed that one somehow. |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have an executable which requires slightly different top-level code on different platforms. I have:
which I thought was a relatively nice solution, but unfortunately I get the rather nonsensical error:
Obviously there are various ways to work around this, but it would be great if it just worked.
The text was updated successfully, but these errors were encountered: