[Haskell-cafe] what I learnt from my first serious haskell programm

Henning Thielemann lemming at henning-thielemann.de
Mon Mar 19 11:49:26 EDT 2007

On Mon, 19 Mar 2007, Chris Kuklewicz wrote:

> I used a "Types" module for most of the types in the all haskell regex-*
> backends I wrote.  Doing anything else tended to lead to cycles, like Rob mentioned.
> This seems to be a result of "module/import" being the one-true-and-unique-way
> to create a namespace combined with almost no support for recursive modules.
> Thus data types that (indirectly) refer to each other must be in the same
> namespace.  Thus one cannot even have a "all data types go in separate modules"
> policy.
> As I write the above, I wonder: if a new variant of "module" that only defines
> data constructors and types could be created then could compilers support these
> if they have mutual recursive imports/references?

If I remember correctly, Oberon has one file per module and allows
recursive modules. The identifiers to be exported are marked with a '*' on
declaration. Interface files are automatically generated from these module
files. (And Oberon programmers do not need to maintain export lists.)

More information about the Haskell-Cafe mailing list