I have a project with this structure:
foo.cabal src/ Foo/ Main.hs
and the foo.cabal part looks like this:
executable foo main-is: Foo/Main.hs hs-source-dirs: src
Main.hs has the package name Foo.Main . When I create it, it compiles everything, but does not create an executable file, since it says that there is no main module.
Warning: output was redirected with -o, but no output will be generated because there is no Main module.
What am I doing wrong?
[EDIT] If I move Main up one level and change foo.cabal to read main-is: Main.hs , it works. Can I have a nested module name for Main?
source share