
7 Jun
2006
7 Jun
'06
9:38 a.m.
Hi,
Look: * we write the two modules importing each other, * reading these modules, we understand the computational meaning of the whole program.
If you compile each file individually, there is no way to know the computational meaning of either file independant of the other. So GHC requires an hs-boot file so it can understand one of them, and then can compile them singularly. To compile mutually recursive modules would require type checking two modules at the same time, and other complexities that GHC does not deal with. Thanks Neil