Assuming your current module is Foo.Bar
, one solution would be to break it up into Foo.Bar
and Foo.Bar.Internal
. You could move all the definitions related to the function you don't want to export--perhaps even all the definitions--into Foo.Bar.Internal
. Then, in Foo.Bar
, you would re-export only the definitions you want the world to see.
This approach has a couple of advantages. It lets you export everything you need, while still giving the user a clear sign that certain things shouldn't be used. It also lets you document your special functions inside the Internal
module, which is going to be useful (if only for your future self :P).
You could simply not export Foo.Bar.Internal
in your .cabal
file, hiding it from the world. However, this is not necessarily the best approach; look at the answers to How, why and when to use the ".Internal" modules pattern?, in particular luqui's.