[GHC] #14522: GHC recompilation checker doesn't take account of deprecated pragmas
GHC
ghc-devs at haskell.org
Fri Nov 24 10:38:21 UTC 2017
#14522: GHC recompilation checker doesn't take account of deprecated pragmas
-------------------------------------+-------------------------------------
Reporter: NeilMitchell | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Incorrect
Unknown/Multiple | error/warning at compile-time
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Given the sources:
{{{#!hs
-- A.hs --------------------
module A
-- {-# DEPRECATED "bad" #-}
where
a = 1
}}}
{{{#!hs
-- B.hs --------------------
module B where
import A
}}}
I get the interactions:
{{{
$ ghc B
[1 of 2] Compiling A ( A.hs, A.o )
[2 of 2] Compiling B ( B.hs, B.o )
$ manually edit A.hs to uncomment the deprecated line
$ ghc B
[1 of 2] Compiling A ( A.hs, A.o )
$ touch B.hs
$ ghc B
[2 of 2] Compiling B ( B.hs, B.o )
B.hs:2:1: warning: [-Wdeprecations] Module `A' is deprecated: bad
|
2 | import A
| ^^^^^^^^
}}}
Observe that after editing the deprecated pragma in {{{A.hs}}} GHC didn't
recompile {{{B.hs}}}, meaning that the warning only appeared after I
touch'd {{{B.hs}}}. Turning on {{{-Werror}}} turns the problem from one of
incorrectly missing warnings to one of incorrect compilation results.
I was also got the same results when adding a deprecated pragma to an
individual function.
My guess is whatever {{{.hi}}} hash you take for recompilation checking
should include deprecated pragmas.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14522>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list