id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
3823	GHC 6.12 breaks combination of records and mutually recursive modules	mboes	igloo	"Take the following code for two mutually recursive modules A and B:
{{{
module A where

import B

data A = X { x :: Bool } | Y

y :: A -> A
y = \_ -> Y

-- A.hs-boot
module A where

data A = X { x :: Bool } | Y

y :: A -> A

module B where

import {-# SOURCE #-} A

data B = A A

a = x (X True)
b = y a
}}}
Compiling this code with ghc --make or ghci gives:
{{{
[1 of 3] Compiling A[boot]          ( A.hs-boot, A.o-boot )
[2 of 3] Compiling B                ( B.hs, B.o )

B.hs:7:4:
    Can't find interface-file declaration for variable x
      Probable cause: bug in .hi-boot file, or inconsistent .hi file
      Use -ddump-if-trace to get an idea of which file caused the error
    In the expression: x (X True)
    In the definition of `a': a = x (X True)
}}}
This code used to work in GHC 6.10.

Note that this issue breaks the build of the hmk package on Hackage. Doubtless other packages making use of mutually recursive modules hit this snag too."	merge	closed	high	6.12.2	Compiler	6.12.1	fixed			Unknown/Multiple	Unknown/Multiple	GHC rejects valid program		T3823			
