Skip to content

source file that compiled fine fails to recompile after touching it (yes, another one)

I'm using the development snapshot ghc-6.11.20090107 and ran into a bug very similar to #2888 (closed), but I think it is different because I could not reproduce that bug in my version.

The setup is very similar: File A.hs contains

{-# LANGUAGE TypeFamilies #-}
module A where
class Foo a where
  data Bar a :: * -> *

and file B.hs contains

{-# LANGUAGE TypeFamilies #-}
module B where
import A
instance Foo Int where
  data Bar Int x where
    Baz :: Bar Int String

Then:

rwbarton@functor:/tmp/a$ ghc --make B
[1 of 2] Compiling A                ( A.hs, A.o )
[2 of 2] Compiling B                ( B.hs, B.o )
rwbarton@functor:/tmp/a$ touch B.hs
rwbarton@functor:/tmp/a$ ghc --make B
[2 of 2] Compiling B                ( B.hs, B.o )

B.hs:8:2:
    Arguments that do not correspond to a class parameter must be variables
    Instead of a variable, found Int
    In the associated type instance for `Bar'
    In the instance declaration for `Foo Int'
Trac metadata
Trac field Value
Version 6.11
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information