问题
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