restructuring the mtl

John Meacham john at
Wed Mar 7 22:49:31 EST 2007

yes. I like this idea very much.

on a related note dealing with the mtl, can we get rid of the
reexporting of names from different modules? it is a real pain whenever
you need to hide something. I have code like

import Control.Monad hiding(join)
import Control.Monad.State hiding(join)

import Prelude hiding(and,or,any,all,(&&),(||))
import Data.List hiding(and,or,any,all)

in my opinion there are only a couple valid times to re-export names
from a different module

1) when providing a public interface to a private implementation. such
as the re-exporting of names from GHC.*. but note, this should only be
done if the implementation truely is private and not normally used.

2) when providing an omnibus collection of related public interfaces. such as
Foreign.C, the important thing is that it _just_ re-exports names. it
does not add any new functions so you will never be forced to include
Foreign.C, it just might be more convinient sometimes depending on what
you are doing.

Control.Monad.* and Prelude + haskell98 libraries are particularly bad
about this sort of thing.


John Meacham - ⑆⑆john⑈

More information about the Libraries mailing list