[GHC] #10360: GHC ignores command-line options if *.o and *.hi files exist

#10360: GHC ignores command-line options if *.o and *.hi files exist -------------------------------------+------------------------------------- Reporter: asr | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- For example, given the module {{{#!hs module Test where foo = putStrLn "Hello World" }}} if I compile using the command {{{ ghc -c Test.hs }}} and then I compile adding the `-Wall` flag {{{ ghc -c -Wall Test.hs }}} I would expect the warning {{{ Test.hs:3:1: Warning: Top-level binding with no type signature: foo :: IO () }}} but GHC produces the message {{{ compilation IS NOT required }}} That is, the `-Wall` flag was ignored because the `Test.o` and `Test.hi` exist. (I couldn't reproduce this behaviour using gcc version 4.6.3.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10360 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10360: GHC ignores command-line options if *.o and *.hi files exist -------------------------------------+------------------------------------- Reporter: asr | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Description changed by asr: Old description:
For example, given the module
{{{#!hs module Test where
foo = putStrLn "Hello World" }}}
if I compile using the command
{{{ ghc -c Test.hs }}}
and then I compile adding the `-Wall` flag
{{{ ghc -c -Wall Test.hs }}}
I would expect the warning
{{{ Test.hs:3:1: Warning: Top-level binding with no type signature: foo :: IO () }}}
but GHC produces the message
{{{ compilation IS NOT required }}}
That is, the `-Wall` flag was ignored because the `Test.o` and `Test.hi` exist.
(I couldn't reproduce this behaviour using gcc version 4.6.3.)
New description: For example, given the module {{{#!hs module Test where foo = putStrLn "Hello World" }}} if I compile using the command {{{ ghc -c Test.hs }}} and then I compile adding the `-Wall` flag {{{ ghc -c -Wall Test.hs }}} I would expect the warning {{{ Test.hs:3:1: Warning: Top-level binding with no type signature: foo :: IO () }}} but GHC produces the message {{{ compilation IS NOT required }}} That is, the `-Wall` flag was ignored because the `Test.o` and `Test.hi` exist. (I couldn't reproduce this behaviour using GCC version 4.6.3.) -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10360#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10360: GHC ignores command-line options if *.o and *.hi files exist -------------------------------------+------------------------------------- Reporter: asr | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Description changed by asr: Old description:
For example, given the module
{{{#!hs module Test where
foo = putStrLn "Hello World" }}}
if I compile using the command
{{{ ghc -c Test.hs }}}
and then I compile adding the `-Wall` flag
{{{ ghc -c -Wall Test.hs }}}
I would expect the warning
{{{ Test.hs:3:1: Warning: Top-level binding with no type signature: foo :: IO () }}}
but GHC produces the message
{{{ compilation IS NOT required }}}
That is, the `-Wall` flag was ignored because the `Test.o` and `Test.hi` exist.
(I couldn't reproduce this behaviour using GCC version 4.6.3.)
New description: For example, given the module {{{#!hs module Test where foo = putStrLn "Hello World" }}} if I compile using the command {{{ ghc -c Test.hs }}} and then I compile adding the `-Wall` flag {{{ ghc -c -Wall Test.hs }}} I would expect the warning {{{ Test.hs:3:1: Warning: Top-level binding with no type signature: foo :: IO () }}} but GHC produces the message {{{ compilation IS NOT required }}} That is, the `-Wall` flag was ignored because the `Test.o` and `Test.hi` exist. (I couldn't reproduce this behaviour using GCC (the GNU Compiler Collection) version 4.6.3.) -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10360#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10360: GHC ignores command-line options if *.o and *.hi files exist -------------------------------------+------------------------------------- Reporter: asr | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by archblob): You can find more details about why thing are the way they are and how to force recompilation in the [[https://downloads.haskell.org/~ghc/7.0-latest/docs/html/users_guide /separate-compilation.html#recomp | user guide]] Maybe change this to a feature request ? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10360#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10360: GHC ignores command-line options if *.o and *.hi files exist -------------------------------------+------------------------------------- Reporter: asr | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by archblob): * priority: normal => low -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10360#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10360: GHC ignores command-line options if *.o and *.hi files exist -------------------------------------+------------------------------------- Reporter: asr | Owner: Type: bug | Status: closed Priority: low | Milestone: Component: Compiler | Version: 7.10.1 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by asr): * status: new => closed * resolution: => invalid Comment: The documentation pointed out in comment:3 is clear. Thanks! I'm closing the ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10360#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC