Question: how to call exported proc inside a module?

I do not understand why the following is not working. I have a package which has a module inside it. The module is exported by the package.

Inside that module, there is a proc, which is also exported by the module.

So why can't one call the proc from outside the package? What Am I doing wrong? and how to correct it? I'd like to be able to call the proc directly. 

A:=module()
  option package;
  export B;
  B := module()
      export foo;

      foo:=proc()
           print("in foo");
      end proc;

  end module;
end module;   

Now when typing (A::B):-foo() Maple is not happy and says Error, module does not export `foo`

I tried different syntax from the above, but can't get it to work. For example A::B:-foo() gives Error, `B` does not evaluate to a module

 

Maple 2019.1

Please Wait...