Use dependencies in Hint when Installing

梦想与她 提交于 2019-12-11 00:48:07

问题


I'm writing a project using Haskell, stack and hint. I'm using hint to interpret a user-supplied module. The catch is that this module uses types and functions from a dependency. When I run my program using stack exec, everything works fine. However, when I install my program (using stack install --local-bin-path bin) and try to run the executable generated, the GHC interpreter fails with an error: Could not find module <module>. This is because (I think) it can't find the files needed for it to interpret source code referring to this dependency. Does anyone know how to fix this? I'm using Windows 10.

I've uploaded a minimal not-working example at https://github.com/bradrn/stack-overflow-hint-dependencies. It works fine if you do stack exec stack-overflow-hint-dependencies, but if you do stack install --local-bin-path bin it fails with Could not find module 'Data.Finite' when you try to interpret something.

来源:https://stackoverflow.com/questions/51064855/use-dependencies-in-hint-when-installing

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