Haskell export current module with additional imported module
Is it possible to write a module in Haskell, which re-exports a module in addition to exporting everything visible inside?
Lets consider following module:
module Test where
import A
f x = x
This module exports everything defined inside, so it exports f
but does not re-export anything imported from A
.
On the other hand, if I want to re-export the module A
:
module Test (
module A,
f
) where
import A
f x = x
Is there a way to re-export A
and export everything defined in Test
without needing to explicitly write every function defined within Test
?
There is a simple solution, just export the module from the module:
module Test
( module Test
, module A
) where
import Prelude()
import A
f x = x