Questions tagged [haskell-stack]

Questions about the Stack, a build tool for the Haskell language. Do not use this tag for general Haskell questions that do not involve Stack.

stack is a modern, cross-platform build tool for Haskell code. It covers management of Haskell environment and project dependencies, building, testing and benchmarking.

1268 questions
7
votes
1 answer

How can I generate a coverage overlay with HPC and Stack?

I have a small/medium sized Haskell codebase for which I'd like to generate a coverage report. By default the coverage report that HPC provides is filled with false negatives (e.g. I use lenses to access most of my record fields, rather than the…
James
  • 121
  • 3
7
votes
0 answers

Sharing ~/.stack with docker

Our team is using Docker for building our Haskell app in it, and in order to optimize build times, we work towards sharing the ~/.stack directory from OS with the one inside docker containers. Initial implementation was to just reuse the one from…
Konstantine Rybnikov
  • 2,457
  • 1
  • 22
  • 29
7
votes
1 answer

In emacs stack-ghci cannot load interface files but `stack build` from the command line does

I can stack build a project from the command line but when I try C-c C-l in emacs (with (custom-set-variables '(haskell-process-type 'stack-ghci))) I get an error that all the package modules I import can't be…
vivian
  • 1,434
  • 1
  • 10
  • 13
7
votes
1 answer

Haskell stack cant find installed ghc

A project that already has been set up is unable to find the GHC. Stack build results in: No compiler found, expected minor version match with ghc-8.0.2 (x86_64-ncurses6-nopie) (based on resolver setting in /home/iam/Work/has/grove/stack.yaml). To…
pricks
  • 341
  • 1
  • 2
  • 12
7
votes
1 answer

stack is not working after upgrading platform to 8.0.2 from 8.0.1

After upgrading haskell platform package, stack command does not work. $ stack path No compiler found, expected minor version match with ghc-8.0.1 (x86_64) (based on resolver setting in /home/eii/exercism/haskell/linked-list/stack.yaml). To install…
Jihyun
  • 883
  • 5
  • 17
7
votes
0 answers

How to use a custom haddock executable to generate documentation with stack?

I'm working on a new theme for Haddock and want to try it on some real projects. How can I configure stack to use my haddock executable? I don't see any config option in stack.yaml. I've also tried putting the new haddock executable into my PATH but…
wereHamster
  • 477
  • 4
  • 9
7
votes
0 answers

avoiding recompilation when types don't change

I have a large Haskell project with many packages built with stack. I have long recompilation times when I make trivial changes in a core model or some configuration data without changing any types. If this were C, I would have to only recompile the…
ghorn
  • 614
  • 3
  • 11
7
votes
0 answers

How can I create static executables on OS X with Stack?

I would like to create a static executable for Darwin for a small utility I wrote called difftodo. difftodo depends indirectly on pcre, and I would like people to be able to download a binary and run it without having to brew install pcre first. If…
jml
  • 1,015
  • 1
  • 9
  • 20
7
votes
1 answer

How to remove old build plans installed by Haskell stack?

How can I remove old build plans (GHC compiler and packages) installed by the stack tool?
Kwang Yul Seo
  • 771
  • 2
  • 7
  • 15
7
votes
1 answer

Haskell: Debugging Long Compilation Times on Stack Projects

I'm currently using Stack to build a project, which totals about 80 modules and 13,000 lines of code. Currently, compilation takes about 3 minutes for a minor change in my types files, which is unacceptable -- it prevents me from rapidly testing my…
Timothy Chu
  • 153
  • 1
  • 9
7
votes
1 answer

Manage hoogle index using stack tool

Context: Before stack I stopped using hoogle locally because my index would somehow lose sync with installed packages. If I recall correctly, I had issues with different results in ghci, command line and cabal sandboxes. Can I leverage stack…
sevo
  • 4,559
  • 1
  • 15
  • 31
7
votes
1 answer

List available stack build plans

How can I get the list of available build plans for stack? On some system I get lts-3.7 and some other I have lts-3.1.
Geekingfrog
  • 191
  • 1
  • 8
7
votes
1 answer

Haskell stack not building test executable

Background I'm building a logfile parser in Haskell. I'm using stack to build it. Running the stack build command works happily and my project compiles. Running stack test, however, produces the following error: parser-test: executable not found I…
Garry Cairns
  • 3,005
  • 1
  • 18
  • 33
6
votes
1 answer

Building multiple executables in the default Haskell Stack project

I used the default stack new to setup a project that has a server and a client as separate executables. I altered the package.yaml file in what seems like the right way (As of April 21, 2020 "There is no user guide") and added a new file to my app…
John F. Miller
  • 26,961
  • 10
  • 71
  • 121
6
votes
1 answer

Install a Haskell package directly from a git repository?

stack allows one to define git repositories as packages using the stack.yaml file. Is it possible to do something like the following, directly via command-line: stack install --resolver=lts-12.1 git@github.com:saurabhnanda/some-repo.git Use-case:…
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60