Judging from the Rust, CommonJS, and ES6 examples, I gather that the “Use of the module across packages” column is supposed to bring the module into scope under the name “foo”? Then the Python example should be from pkg import foo.
The posted example makes bar available under pkg.foo.bar. Surprisingly, there are in fact cases where import pkg does not accomplish this same feat (namely, when pkg doesn’t import foo, or imports it under another name).
Haskell:
No declarations in the parent module (not counting the extremely long and delicate lists of modules that you have to constantly maintain for their build system, cabal).
Syntax inside the module:
module Pkg.Foo(bar) where
bar :: ()
bar = ()
Importing from within or from, er… not within a package:
import qualified Pkg.Foo as Foo
(I just noticed how unrelated the words “within” and “without” are, and I’ve spoken this language my entire life.)