Mutually recursive modules

Isaac Dupree isaacdupree at
Thu Jun 5 19:15:29 EDT 2008

Antoine Latter wrote:
> On Thu, Jun 5, 2008 at 4:46 PM, Richard Giraud <richardg at> wrote:
>> Does the current {-# SOURCE #-}/.hs-boot scheme allow for compilation of
>> arbitrary MRMs?  Or are there known cases where it doesn't work?  If there
>> are cases where it doesn't work, are there other options?
> I don't think the .hs-boot method can deal with having a set of
> mutually recursive types split by module boundaries.

sometimes it can, I think

> If all you want to do is keep your API clean,  you can stick all of
> your types in one monolithic module that isn't exposed by the package,
> and then re-export them in public modules.

Yeah, remember that you only have to put (some of) your types together 
-- you can spread out your functions in your modules any way you want.


More information about the Glasgow-haskell-users mailing list