Nice idea, but this way you still need to modify the single module which glues them alltogether.
I wanted to allow the users of the module add some functionality to the module itself.
Thanks for the perspective though,
-- Ozgur
On Mon, Nov 30, 2009 at 5:15 PM, Ozgur Akgun <ozgurakgun@gmail.com> wrote:Let's say you have some module A which introduces 3 symbols:
> Is there a way of splitting the definition of a module into multiple files?
module A (a, b, c) where
a = 1
b = 2
c = 3
Now we will split it in 3 modules:
module B ( b ) where
b = 2
module C ( c ) where
c = 3
module A (a, b, c) where
import B ( b )
import C ( c )
a = 1
You can also do the inverse: create a single module of which parts are
exported in multiple other modules. This can be useful to avoid
circular dependencies while still presenting a nice interface to your
library users.