export haskell module with different hierarchy

浪子不回头ぞ 提交于 2019-12-01 21:52:37

This isn't possible at present, short of using symlinks or similar to point Database.M to M which would have various problems with portability and version control.

Simon Marlow proposed a new option for GHC to add support for aliases a few months ago: http://www.haskell.org/pipermail/glasgow-haskell-users/2014-April/024920.html

His idea was that you could run ghc with a new variant of the -i option:

ghc -iDatabase.M=M

and then anything in the M folder would be treated as being part of Database.M as you want.

You'd also be able to put the new option in the hs-source-dirs field in .cabal files.

However there were various objections to the proposal so he's withdrawn it for now. The main problems were that it adds complexity and several other tools (e.g. cabal) would also have to be changed to support it.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!