Mutually Recursive Modules

Hello I'm using GHC 6.8.2 with mutally recursive modules. I'm familiar with how to do simple cases in GHC ({-# SOURCE #-} and .hs-boot files) but I can't figure out how to get it to work for a particular set of modules. Is it known (i.e., proven) that GHC 6.8.2 can compile any set of mutually recursive modules without refactoring? Are there known limitations? Thanks, Richard G.

Richard Giraud wrote:
Hello
I'm using GHC 6.8.2 with mutally recursive modules. I'm familiar with how to do simple cases in GHC ({-# SOURCE #-} and .hs-boot files) but I can't figure out how to get it to work for a particular set of modules.
Is it known (i.e., proven) that GHC 6.8.2 can compile any set of mutually recursive modules without refactoring? Are there known limitations?
With the old (6.2 and before) .hi-boot scheme where there was no abstraction in boot-files, it could probably do anything that it could do. But I'm not convinced with .hs-boot... it can resolve one level of cycle, and I don't know how to *prove* that it *can't* do any given thing, but I strongly suspect there are things it can't do. Luckily, it is very often the case that your code will be better off anyway if refactored to have less module recursion. (though not always.) -Isaac

G'day all.
Quoting Isaac Dupree
Luckily, it is very often the case that your code will be better off anyway if refactored to have less module recursion. (though not always.)
Nonetheless, I prefer not to leave the robustness of my code to luck. Besides, if I liked structuring code around artificial language restrictions, I'd be programming in C, not Haskell. Cheers, Andrew Bromage
participants (3)
-
ajb@spamcop.net
-
Isaac Dupree
-
Richard Giraud