-main-is silently failes to create executable when no main is found.
[timothy@timothy main-is]$ cat Foo.hs
module Foo where
main = print "foooballls"
[timothy@timothy main-is]$ ghc Foo.hs
[1 of 1] Compiling Foo ( Foo.hs, Foo.o )
[timothy@timothy main-is]$ ls
Foo.hi Foo.hs Foo.o
[timothy@timothy main-is]$ ghc Foo.hs -main-is GeorgeWashington
[timothy@timothy main-is]$ ls
Foo.hi Foo.hs Foo.o
[timothy@timothy main-is]$ ghc Foo.hs -main-is Foo
[1 of 1] Compiling Foo ( Foo.hs, Foo.o )
Linking Foo ...
[timothy@timothy main-is]$
There should be a warning when I try to compile with -main-is as GeorgeWashington. Just for us bad spellers :D
$ ghc -v
Glasgow Haskell Compiler, Version 7.4.2, stage 2 booted by GHC version 7.4.1
--clip--
Trac metadata
Trac field |
Value |
Version |
7.4.2 |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
Unresolved |
Component |
Compiler |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|