我知道我可以重新导出模块,如下所示:
module Test (module Test) where
import Prelude as Test
import A as Test
f x = x
但现在我想重新导出一个部分导入的模块,如
module Test (module Test) where
import Prelude (map, filter) as Test
import A as Test
f x = x
参考文献:
- https://www.reddit.com/r/haskell/comments/42sx3x/haskell_reexport_everything/
- Haskell导出当前模块与附加导入模块
1条答案
按热度按时间9gm1akwq1#
从Haskell wiki about Import,有这样一个例子:
所以,这样做: