
For recurive import, GHC suggests using an hs-boot file to "get started". So far, I do not know, what does this mean. But I do not understand, why at all GHC needs any help in this situation. Look: * we write the two modules importing each other, * reading these modules, we understand the computational meaning of the whole program. Hence, it must be compiled according to this meaning. Why does GHC need additional help? Thank you in advance for explanation. ----------------- Serge Mechveliani mechvel@botik.ru

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
participants (2)
-
Neil Mitchell
-
Serge D. Mechveliani