title: How to implement generic interfaces with submodules in Fortran?
body: <p>My problem is that I have two generic procedures implemented each one in 'mod1.f08' and 'mod2.f08'. </p>
  
  <pre><code>! mod1.f08
  MODULE mod1
  
     INTERFACE func1
        procedure :: foo_int, foo_real
  ...
  
  ! mod2.f08
  MODULE mod2
  
     INTERFACE func2
        procedure :: bar_int, bar_real
  ...
  </code></pre>
  
  <p>But I want to join both as submodules of only one module, in this way: </p>
  
  <pre><code>! mod1.f08
  MODULE (mainmodule) mod1
  
     INTERFACE func1
        procedure :: foo_int, foo_real
  ...
  
  ! mod2.f08
  MODULE (mainmodule) mod2
  
     INTERFACE func2
        procedure :: bar_int, bar_real
  ...
  
  ! mainmodule.f08
  MODULE mainmodule
  
      INTERFACE
         procedure :: func1
         procedure :: func2
      END INTERFACE
      ...
  </code></pre>
  
  <p>Is it possible to do something like this?</p>