Loading ...
Sorry, an error occurred while loading the content.

Re: module rec

Expand Messages
  • code17
    Then 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
    Message 1 of 6 , Feb 1, 2007
    • 0 Attachment
      Then 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.

      Good luck!

      - code17

      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).
    Your message has been successfully submitted and would be delivered to recipients shortly.