How to re-export a single entity in haskell?
I know modules can be re-exported, but is this also possible for a single entity (like a function)?
I've tried this example:
File: SomeData.hs
module SomeData where
data SomeData = SomeData
File: ReExport.hs
module ReExport ( SomeData ) where
import SomeData
File: Main.hs
import ReExport
x = SomeData -- Error on this line: Illegal term-level use of the type constructor ‘SomeData’
The re-export alone compiles with no problems, but when I try to use anything from it I get the error: Illegal term-level use of the type constructor ‘SomeData’. What exactly is ReExport.hs exporting in this case?