[GHC] #10333: hs-boot modification doesn't induce recompilation

GHC ghc-devs at haskell.org
Tue Apr 21 08:38:13 UTC 2015


#10333: hs-boot modification doesn't induce recompilation
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  GHC accepts       |  Unknown/Multiple
  invalid program                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------
Description changed by ezyang:

Old description:

> Consider these modules:
>
> X.hs-boot
> {{{
> module X where
> }}}
>
> Y.hs
> {{{
> module Y where
> import {-# SOURCE #-} X
> data T = T
> data S = S T
> }}}
>
> X.hs
> {{{
> module X where
> import Y
> }}}
>
> `ghc --make Y.hs` will compile fine. Now, modify `X.hs-boot` to add a
> `data T` (which will cause an ambiguous identifier error in Y.hx`. Run
> `ghc --make Y.hs` and nothing happens!
>
> (You might also notice something else a bit funny, which is that `X.hs`
> gets compiled, even though it's not directly in the import chain of Y. I
> think this might be intentional but I'm not sure.)
>
> Discovered this while poking around #10182.

New description:

 Consider these modules:

 X.hs-boot
 {{{
 module X where
 }}}

 Y.hs
 {{{
 module Y where
 import {-# SOURCE #-} X
 data T = T
 data S = S T
 }}}

 X.hs
 {{{
 module X where
 import Y
 }}}

 `ghc --make Y.hs` will compile fine. Now, modify `X.hs-boot` to add a
 `data T` (which will cause an ambiguous identifier error in `Y.hx`. Run
 `ghc --make Y.hs` and nothing happens!

 (You might also notice something else a bit funny, which is that `X.hs`
 gets compiled, even though it's not directly in the import chain of Y. I
 think this might be intentional but I'm not sure.)

 Discovered this while poking around #10182.

--

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10333#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list