
Hi Cafe, Let's say we have a module like module Foo where foo, bar :: String -> Something ... and use it elsewhere as import qualified Foo as F ... F.foo ... This is almost just if we had a data type defined as data FooModule = FooModule { foo :: String -> Something, bar :: String -> Something } together with a singleton `f : :FooModule` and referenced it as f.foo, f.bar etc. Has some language explored this idea of making modules explicit as language-level objects? It seems that there could be some interesting possibilities, such as: - Abstract modules (just a definition of the data type). Then - Being able to replace a module with a different one (like a fake one for testing). - Polymorphic modules that could be instantiated for specific types. Thanks, Petr