why hs-boot
Neil Mitchell
ndmitchell at gmail.com
Wed Jun 7 05:38:08 EDT 2006
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
More information about the Glasgow-haskell-users
mailing list