Using -fext-core without a Main function
Isaac Dupree
ml at isaac.cedarswampstudios.org
Wed Apr 14 15:22:35 EDT 2010
On 04/13/10 12:48, Max Bolingbroke wrote:
> The flag -fext-core is a red herring. GHC assumes any module with no
> "module" declaration is actually called Main and hence insists on a
> main declaration.
...or to be precise, it means
module Main (main) where {...}
...and this is what the Haskell 98 standard requires (section 5.1).
Thus, main has to be defined/imported in said module, so that it can be
exported thus.
(Also, GHC feels free to remove/optimize/change definitions that are not
exported...)
-Isaac
More information about the Glasgow-haskell-users
mailing list