Description
As long as I develop a package without Data-Files I can run and test my program locally using cabal run
and cabal repl
. As soon as I start to use Data-Files, the trouble begins. If I am in ghci
/cabal repl
I cannot simply hit :reload
(or omit even that, since Haskell modules are not affected by Data-Files) anymore in order to adapt to changes in the Data-Files. I have to run cabal install
. However, this may fail, since the program is temporarily incorrect.
Is there a way of using the local Data-Files when I do cabal run
and cabal repl
and using installed Data-Files when running programs from .cabal/bin
? A way to achieve this might be Data-Files that are accessed relative to the path of the executable.
Related package: https://hackage.haskell.org/package/executable-path/
Related issue: #4120
Related discussion: http://mail.haskell.org/pipermail/cabal-devel/2017-March/010393.html