Haskell重新脱离模块,该模块仅导入标识符的选定部分
我知道我可以重新启动模块,例如以下内容:
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/haskell/comments/42sx3x/haskell_reexport_everything/
- 18035458/HASKELL-EXPORT-CRURRENT-MODULE-WITH-ADDITIONAL-IMPORTED-MODULE/18035699#18035699“> HASKELL EXPORT EXTORT CRUSTRAR PRUSTRY模块,带有其他导入的模块
I know that I can re-export modules like following:
module Test (module Test) where
import Prelude as Test
import A as Test
f x = x
But now I want to do re-export a partial imported module like
module Test (module Test) where
import Prelude (map, filter) as Test
import A as Test
f x = x
References:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自 haskell wiki关于导入,有一个这样的示例:
因此,这样做:这样:
From Haskell wiki about Import, there is an example like this:
So, do it like this: