Talk:Haskell/Standalone programs

Move from the Haskell in Practice track
Reasons for moving this chapter from the practical track to the middle of the Beginner's Track: Duplode (discuss • contribs) 05:14, 29 September 2013 (UTC)
 * There is really no way we can justify not mentioning something this basic early on.
 * The recently incorporated Haskell/Arrow tutorial has an example with console interaction which is best ran from a terminal, so we'd better have explained how to compile an independent program already.
 * It doubles as a trivial, but complete, example of how to write and use a whole module, thus complementing Haskell/Modules.
 * In its current shape, this chapter is brief enough not to be obtrusive - very simple examples and the minimal explanation to get things going.
 * Haskell/Using GHCi effectively is a precedent for practical interludes like this one; indeed, I feel it would be strange having a short chapter with tips and tricks about GHCi and not even mentioning how to build a standalone executable.

This article doesn't jive with the previous
I'm coming here from the previous module on Modules, and some things just don't seem to make sense.

Modules mentions that a module's file name must match the name given to the module, and also that the first letter must be capitalized. But here in Standalone programs, the main module is given the name 'Main' while its file name is thingamie.hs. What gives?

Also (and this may be related to my previous question) compiling bonjourWorld as a split-module program fails mentioning that ghc 'could not find module 'Hello'

Sgcb (discuss • contribs) 23:20, 6 May 2014 (UTC)


 * Well spotted, thank you. The  problem was a silly mistake (the file name should be Hello.hs), which I have just fixed. As for thingamie.hs, it works because the file name convention is there so that GHC can find the module files automatically. Since you always tell explicitly what the   file is through the command line, it doesn't have to follow the convention. I added a paragraph explaining that after the example with two modules.--Duplode (discuss • contribs) 15:14, 7 May 2014 (UTC)