Using everything exported in a module and its submodules

Okay! I found it all :smiley: I indeed had to export everything

module MyPackage
  module Options
  
      module SolveMod
          struct Both end  # public interface
          struct BranchBendersCut end  # public interface
          struct ILP end  # public interface
          struct NoOptimize end  # public interface
          struct gF end  # public interface
          struct gFexploreonlyILP end  # public interface
          struct gFexploreonlyben end  # public interface
          const USolveMod = Union{Both,BranchBendersCut,ILP,NoOptimize,gF,gFexploreonlyILP,gFexploreonlyben}  # not part of the public interface
  
          export Both, BranchBendersCut, ILP, NoOptimize, gF, gFexploreonlyILP, gFexploreonlyben, USolveMod
      end
  
      using .SolveMod
  
      module SPSolve
          struct Poly end  # public interface
          struct LP end  # public interface
          const USPSolve = Union{Poly,LP}  # not part of the public interface
          export Poly, LP, USPSolve
      end
  
      using .SPSolve
  
      module WResults
          struct WHTML end  # public interface
          struct WLocal end  # public interface
          const UWriteResults = Union{WHTML,WLocal,Bool}  # not part of the public interface
          export WHTML, WLocal, UWriteResults
      end
      using .WResults
  
      export SolveMod, SPSolve, WResults, Both, BranchBendersCut, ILP, NoOptimize, gF, gFexploreonlyILP, gFexploreonlyben, USolveMod, Poly, LP, USPSolve, WHTML, WLocal, UWriteResults
  end
end

using .Options

Now it works like a charm, thanks :slight_smile:

2 Likes