To build static executables for command line or server applications from Haskell for Mac projects on both OS X and Linux (e.g., to deploy to hosts without a Haskell toolchain), please follow the instructions in this article.
Building static executables with Stack
Have more questions? Submit a request
Now getting excited . Does the article means that we can develop an executable in Haskell for mac that can run in Raspberry pi without the need of haskell environment to be installed there too ? Can you please describe a little bit dependent system libraries that is needed for newbies?
I believe, the main problem in compiling for Raspberry Pi is that this involves cross-compiling (i.e., the compiler running on an Intel architecture needs to generate ARM code for the Raspberry Pi). As far as I know, Stack does not have build in support for cross-compilation. So, I am sorry, I don't think there is an easy way to get this working.
This is possible with Docker, but instead of the Haskell environment you would need to have Docker installed on the Pi (or whatever the target machine is).
The link to the article is broken. Is it still relevant?
Henner, yes, sorry, my blog platform provider dropped the ball and now I will have to set up a new blog. I am planning to do that, but haven't found the time yet.
@Manuel, over 9 months later the link is still broken.
Could you please fix the link.