
Dennis Raddle
I got a private reply which helps but it made me think of another question.
In the stack demo, there's one executable 'helloworld-exe' which is compiled from app/Main.hs.
If I'm going to have several executables, what do I call the source files, and how do I control the file name of the executable that gets built?
AFAIU that's what the `executable: <name>` in your .cabal does. This is the text describing executable sections at [1]. Executable sections (if present) describe executable programs contained in the package and must have an argument after the section label, which defines the name of the executable. This is a freeform argument but may not contain spaces. And you control the source files using `main-is:` and `other-modules:`. One common pattern I've seen is to put most source files into a library and then have each executable use that library and have a very "thin" main source file. /M [1]: https://www.haskell.org/cabal/users-guide/developing-packages.html#executabl... -- Magnus Therning OpenPGP: 0x927912051716CE39 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus The greatest performance improvement of all is when a system goes from not-working to working. — John Ousterhout