Ticket #2710 (new bug)
-main-is flag in {-# OPTIONS #-} pragma not fully supported
| Reported by: | Stephan202 | Owned by: | |
|---|---|---|---|
| Priority: | lowest | Milestone: | 7.6.1 |
| Component: | Compiler | Version: | 6.8.3 |
| Keywords: | -main-is ghc | Cc: | dterei |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Incorrect warning at compile-time | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
The -main-is flag is dynamic an may therefore be placed inside the {-# OPTIONS #-} pragma. Version 6.8.3 of runghc respects this flag (that is, runghc works as expected), but this cannot be said of ghc.
Example file T.hs
{-# OPTIONS -main-is T.main #-}
module T where
main :: IO ()
main = putStrLn "Hello world"
Example execution
$ ghc --make -o t T.hs [1 of 1] Compiling T ( T.hs, T.o ) Warning: output was redirected with -o, but no output will be generated because there is no Main module.
Additional notes
This bug is related to ticket #1312, but the difference is that ticket #1312 only addressed runghc, not ghc.
Change History
Note: See
TracTickets for help on using
tickets.
