Mutually recursive modules

Antoine Latter aslatter at gmail.com
Thu Jun 5 17:56:39 EDT 2008


On Thu, Jun 5, 2008 at 4:46 PM, Richard Giraud <richardg at richardg.name> 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.

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.

-Antoine


More information about the Glasgow-haskell-users mailing list