7188Re: module rec
- Feb 1 1:38 AMThen I guess there is no other solution other than recursive module, because
it's actually recursive: Mod1 and Mod2 depends my_struct and hence must see
state_t, while the module State where state_t should be defined in also
depends on Mod1 and Mod2.
Unless you can try to factor out the parts in Mod1 and Mod2 on which State
depends and move them into State, but it really depends.
dmitry grebeniuk <gds-mlsts@...> writes:
> I want the compiler to check my code, because it really
> guarantees that state_t can be created/modified only in one
> small module. This module can be fully and quickly checked
> without reviewing other parts of my code.
> I don't need the cool feature "private type", I could be
> satisfied by opaque state_t, but I can't declare it as
> opaque type because of the structure of my code, described
> in previous letter (functions that work with state_t
> requires some functions that work with my_struct).
- << Previous post in topic