How to run a stack build in a Docker container?

I'd like to set up a containerized build of a Haskell stack project for work. I know that stack --docker build exists, but I'd like to do this just with docker, so my colleagues are not required to first install stack. I currently have a Dockerfile ...
more »

2017-04-16 09:04 (1) Answers

How to report failing test cases

I am using Haskell Test Framework through Stack to evaluate QuickCheck properties. When I run stack test, failing properties are reported in the form of Gave up! Passed only 95 tests. The many examples of property testing I've found report failures...
more »

2017-04-11 15:04 (2) Answers

Incorporate websockets into Yesod

How do you incorporate websockets into Yesod? I've created a project using yesod-postgres template. stack new rl yesod-postgres Handler/Home.hs file looks like this (no modification yet): module Handler.Home where import Import import qualified...
more »

2017-04-06 14:04 (1) Answers

Haskell Stack ghci flags

Basically, I am trying to achieve the following: stack ghci --flag proj:dev but it seems that flag is not valid for ghci, only for build. How can I achieve this? If possible *Notes: proj is a cloned yesod-postgres template, I do not want to use...
more »

2017-03-21 09:03 (0) Answers

Haskell stack script extra deps

In a normal stack project, I can add extra-deps in the stack.yaml file: extra-deps: - text- - unm-hip- - safe-exceptions- - quickcheck-properties-0.1 - time-interval-0.1.1 - time-units-1.0.0 - snowball- - dictionaries-0.1...
more »

2017-03-13 23:03 (0) Answers

How to use different ghc builds with stack?

I would like to have different, non-ABI-compatible, builds of the same version of GHC, and use them in different projects. (In my case, the difference between the builds is integer-simple vs gmp.) The comments in this issue show how to add a custom...
more »

2017-03-09 10:03 (1) Answers

Specify to Stack which version of Happy to use

I'm running up against a bug in the latest version of Happy (1.19.5). How do I tell stack to go look for an even newer version of Happy (1.19.6) found only at the git repo? Right now, I'm letting stack manage everything; the only reference to Happy i...
more »

2017-03-08 11:03 (1) Answers

How do I use hdevtools with ghcjs within stack

So it looks like hdevtools cannot be directly used with ghcjs. Using stack install hdevtools within a GHCJS stack project gives me: Error: While constructing the build plan, the following exceptions were encountered: In the dependencies for hdevtoo...
more »

2017-02-28 20:02 (0) Answers

How to get GHC command as issued by Cabal/Stack?

GHC can be used as a linter for the Neovim plugin ale. The configuration uses the following command to lint a file: stack ghc -- -fno-code -v0 %t where %t is the file in question. This is fast and pretty great, however, it doesn't recognize any of...
more »

2017-02-14 06:02 (1) Answers

Haskell Stack package installation error

user$: stack install dictionaries Error: While constructing the build plan, the following exceptions were encountered: In the dependencies for dictionaries- binary- must match >=0.7.5 && <0.8 (latest applicable is 0...
more »

2017-02-09 17:02 (2) Answers

ghc failed to compile a sanity check

I've recently been trying to use haskell-stack, but whenever i try to do stack setup i get The GHC located at /home/piotrek/.stack/programs/x86_64-linux/ghc-8.0.1/bin/ghc failed to compile a sanity check. Please see: http://docs.haskellstac...
more »

2017-02-04 17:02 (0) Answers

Why doesn't Stack allow relative paths?

I'm working on a library which depends on an external C library, and would like to bundle the headers and lib files with my project. The stack.yaml file requires all paths to be absolute, which is clearly not ideal for this purpose. As per @adamse's...
more »

2017-02-04 12:02 (0) Answers

Stack installing cairo for threadscope

I started installing threadscope through stack (rather than cabal, is that OK? threadscope requires cairo. $ stack install cairo cairo- configure -- While building package cairo- using: ...
more »

2017-01-29 11:01 (2) Answers

Stack not resolving dependencies properly

I'm trying to set up Hakyll on a fresh Ubuntu 16.04 instance, but I can't seem to get the Stack-based setup instructions right. Starting out with stack install hakyll, I get: Error: While constructing the build plan, the following exceptions were e...
more »

2017-01-21 07:01 (2) Answers

Haskell Stack Local Server

I am behind a firewall with strict rules about downloading software from the internet, so I would like to know if it is possible to download an entire stackage LTS snapshot in one go and serve it on a local server, to which we could then point the st...
more »

2017-01-19 18:01 (0) Answers