#2888: Source file that compiled fine no longer compiles after touching it.
-----------------------------+----------------------------------------------
Reporter: Eelis- | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.10.1 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
In the following session, {{{t.hs}}} first compiles fine, then after being
touched, no longer does:
{{{
eelis ~/sand : cat M.hs
{-# LANGUAGE TypeFamilies #-}
module M where
class C a where data D :: * -> *
eelis ~/sand : cat t.hs
{-# LANGUAGE TypeFamilies #-}
import M
data Bla = Bla
instance C Bla where data D a = D
main = return ()
eelis ~/sand : ghc --make t.hs
[1 of 2] Compiling M ( M.hs, M.o )
[2 of 2] Compiling Main ( t.hs, t.o )
Linking t ...
eelis ~/sand : touch t.hs
eelis ~/sand : ghc --make t.hs
[2 of 2] Compiling Main ( t.hs, t.o )
t.hs:4:21:
Type indexes must match class instance head
Found a but expected Bla
In the associated type instance for `D'
In the instance declaration for `C Bla'
}}}
It seems to me that {{{t.hs}}} should either compile both times, or not
compile at all, but not only part of the time.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2888>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs