[Haskell-beginners] Deploying a haskell application (not a webapp)

Michael Orlitzky michael at orlitzky.com
Tue Dec 16 15:24:07 UTC 2014


On 12/16/2014 08:47 AM, Alan Buxton wrote:
> Hiya
> 
>  
> 
> It turned out that my issue was to do with the data files. When
> compiling locally, cabal puts the files in /home/alan/.cabal/share and
> the compiled application expects to find the files there. So when I
> deploy my binary I have to also put some files into
> /home/alan/.cabal/share which feels wrong.

If you list the data files in Cabal's "data-files" field, and you use
Cabal to build on the server, then you can ask Cabal where it put those
files at runtime:

https://www.haskell.org/cabal/users-guide/developing-packages.html#accessing-data-files-from-package-code



More information about the Beginners mailing list