Multiple Haskell cabal-packages in one directory

别来无恙 提交于 2019-12-22 08:51:34

问题


What is the recommended way of having several cabal packages in one directory?

Why: I have an old project with many separable modules. Since originally they formed just one program it was, and still is, handy to have them in same directory for easy compiling.

Options

  1. Just suffer and split everything, including VCS holding the stuff, into different directories?
  2. Hack cabal until it is happy with multiple .cabal files in same directory?
  3. Make another subdirectory for each module and put .cabal files there along with symlinks to original pieces of code?
  4. Something smarter? What?

回答1:


I'd have to recommend option 1 or 3 for cleanliness. I'm not sure how to get around this, if there is even a way to get around this.




回答2:


I'd say a modified option of 1: subdirectories for everything, no symlinks, but keep everything under a single VCS.

This problem is on the issue list for Cabal 2.




回答3:


I would recommend that this is exactly what workspaces in Leksah were designed to do. Just get your hands on Leksah and then the rest will sort itself out.



来源:https://stackoverflow.com/questions/1797166/multiple-haskell-cabal-packages-in-one-directory

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