You must explicitly re-export type classes (this means that you also have to explicitly export everything else), i.e.
Your foreplay:
module CustomPrelude ( sum, product, Prelude.IO, Prelude.String, Prelude.print, Prelude.Show, Prelude.show, (Prelude.$), Prelude.Int, (++) ) where import qualified Prelude import Data.Foldable import Data.Monoid (++) :: Monoid m => m -> m -> m (++) = mappend
Using:
{-
To save yourself typing (and to preserve sanity while editing), you probably want to do: A) Divide your new foreplay into several specialized files B) Export the module so that you do not have to explicitly repeat everything
eg:.
module CustomPrelude.Classes (Show,show,Functor,fmap, Monoid,mempty,mappend, Monad,return,(>>=)) where import Data.Monoid
module CustomPrelude.Functions ( module ReExport, Prelude.print, Prelude.IO, -- ok these technically aren't functions, but I didn't want to make yet another module just for demonstration purposes Prelude.String, Prelude.Int, (Prelude.$), (++) ) where import qualified Prelude import Data.Foldable as ReExport import Data.Traversable as ReExport import Data.Monoid as ReExport (++) :: Monoid m => m -> m -> m (++) = mappend
module CustomPrelude ( module P ) where import CustomPrelude.Classes as P import CustomPrelude.Functions as P
Please note that you can save a little on work by renaming your re-exported modules under the same name when importing.