Q:

Any system of subset module imports in haskell?

With Perl's standard module exports you can specify sets of functions to export/import by tag.
So, you can have sets like :all or :private or :test or whatever.
Hisorically, the advice seems to be that if you just want some semi-private functions then have an "inner" module and re-export the "default" parts of it.
I'm starting to want a semi-private interface for testing purposes. So, is that still the way to do it, or am I missing something in a recent ghc?

A:

No, it's not possible in Haskell.
The Haskell solution to this problem is just to have separate modules. E.g.
module Foo.Private
  ( private1
  , private2
  , private3
  ) where

...

module Foo
  ( public1
  , public2
  , public3
  ) where

...

Additionally, if you want Foo.Private to re-export everything from Foo:
module Foo.Private
  ( module Foo
  , private1
  , private2
  , private3
  ) where

import Foo

...

But if Foo in turn imports Foo.Private, then you'll have either to use
recursive modules, or to move the actual definitions to a third module,
say Foo.Base, which would be imported by Foo and Foo.Private.
Also, unlike perl, ghc doesn't support defining multiple modules in the same
file yet, which makes this solution somewhat heavyweight.

