Hello, The Haskell'98 report does not specify if/how recursive modules should work. I wrote a paper a long time ago that formalizes and implements this feature (http://www.purely-functional.net/yav/publications/modules98.pdf). I very much doubt that separate compilation is much of a problem in practise because you only need to compile modules that are _recursive_ at the same time, and usually these tend to be fairly small. Figuring out the interface of the modules is a bit trickier in some pathological cases involving module re-exports, but this is already the case with non-recursive modules.
One real technical problem that I remember was implementing "defaulting", which is specified in terms of a single module. With recursive modules, one could get mutually recursive functions from different modules, in which case it is not clear which set of defaulting rules to apply or how to combine them. Hope that this helps, -Iavor On Wed, Aug 13, 2008 at 4:30 AM, <[EMAIL PROTECTED]> wrote: > G'day. > > Quoting "C.M.Brown" <[EMAIL PROTECTED]>: > >> However I saw no real argument for not having cyclic inclusions. You >> say we shouldn't have to spend time writing hi-boot files, and yet you >> also think >> that GHC should not do it automatically. So we have to restrict all >> programmers to never writing cyclic inclusions? :) > > GHC generates .hi files for most modules automatically. The only reason > why hi-boot files are needed for cyclic imports is because of the > possibility that you can't generate a .hi file from the module alone. If > you could do that, then you could support cyclic imports without needing > hi-boot files. > > Cheers, > Andrew Bromage > _______________________________________________ > Haskell-Cafe mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe > _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
