Source file that compiled fine no longer compiles after touching it.
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.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.10.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |