
30 Nov
2009
30 Nov
'09
12:21 p.m.
On Mon, Nov 30, 2009 at 5:15 PM, Ozgur Akgun
Is there a way of splitting the definition of a module into multiple files?
Let's say you have some module A which introduces 3 symbols: 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.