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
6
votes
1 answer

How long does stack keep the packages in its cache?

I'm working with the Lean theorem prover and I would like to build features like those of stack and start building library caches. One thing that I'm unsure about is when to delete older packages in the cache. I could think that, if I have two…
simon1505475
  • 675
  • 3
  • 9
6
votes
2 answers

How to change missing-fields warning to an error in GHC

I'm using GHC on haskell-stack project. I'd like to lift missing-fields warning up to a compile error. I tried to do the following, but it doesn't work. {-# OPTIONS_GHC -Werror=missing-fields #-} -- DOESN'T WORK Could you tell how to lift missing…
ryo
  • 2,009
  • 5
  • 24
  • 44
6
votes
3 answers

What can cause `stack build` to keep unregistering local dependencies every time?

I've tried stack clean, and also removing .stack-work. But still, every time I run build it unregisters 5 (the same) packages. stack build --dry-run tells me the list, but not any reason why. I've also recently upgraded from 1.4.1 Also, if it is…
Wizek
  • 4,854
  • 2
  • 25
  • 52
6
votes
1 answer

LTS versions installed by stack

Is there a stack command one can run to get a list of all the LTS versions installed by stack on my system?
user1023733
  • 805
  • 5
  • 14
6
votes
0 answers

Speeding up Haskell stack project compilation and git branches

I cannot change GHC's compilation times, but I can control the environment in which things are compiled. What can I do with git and stack to minimize downtime due to (re-)building? Haskell stack caches compiled dependencies in the .stack-work…
BooneJS
  • 61
  • 2
6
votes
1 answer

How to use import a personal library in another project with Stack?

So I have a personal stack library, let's call it Foo. In Foo, I have a FooModule module file named FooModule.hs. I have another stack project called Bar. How do I import the FooModule.hs module to project Bar?
Gal
  • 5,338
  • 5
  • 33
  • 55
6
votes
0 answers

How to auto-populate "exposed-modules or other-modules" in *.cabal

Somewhat annoyingly, I keep getting this warning (for some oh 20 modules or so, polluting the build output I'd otherwise see without scrolling such as actual ghc warnings etc): "The following modules should be added to exposed-modules or…
metaleap
  • 2,132
  • 2
  • 22
  • 40
6
votes
0 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…
dpacbach
  • 121
  • 1
  • 6
6
votes
2 answers

Where does 'stack haddock' place the docs it generates?

Where does stack haddock (or stack build --haddock) place the documentation that it generates?
orome
  • 45,163
  • 57
  • 202
  • 418
6
votes
1 answer

GHCI Segfault When Creating a Database Connection with postgresql-simple

I am getting a GHCI segfault when trying to create a database connection in GHCI with postgresql-simple. I am using GHC 8.0.1, OSX 10.11.16. I do not have a system GHC, only the one installed by stack. If I do the following in my project, it…
erewok
  • 7,555
  • 3
  • 33
  • 45
6
votes
1 answer

How to make Stack only build one executable? stack build :exe1 doesn't work?

I have multiple executables in one of my Stack projects: executable m1 hs-source-dirs: src main-is: Main1.hs default-language: Haskell2010 build-depends: base >= 4.7 && < 5 executable m2 hs-source-dirs: src …
rityzmon
  • 1,945
  • 16
  • 26
6
votes
1 answer

install ghcjs from stack

I have GHC installed through stack ( so that stack ghc -- --version shows GHC-7.10.3 ) $ stack install ghcjs Run from outside a project, using implicit global project config Using resolver: lts-5.2 from implicit global project's config file:…
john mangual
  • 7,718
  • 13
  • 56
  • 95
6
votes
2 answers

When using "stack test", my hspec tests output is not colorized

This is an infuriating thing since I have built Hspec-based test suites in which colors all behave normally. But on this project, I cannot get colors to appear when I run all of the test suites at once. My project.cabal is set up like…
Savanni D'Gerinel
  • 2,379
  • 17
  • 27
6
votes
1 answer

Why does Stack not recognize the dependency it just installed?

So I'm trying to use reactive-banana + wxHaskell for GUI programming. As a newbie to Haskell and its dev tools, I'm very perplexed by stack. So I try stack install wx, which prompts me to install wxcore, which prompts me to install wxc and…
allidoiswin
  • 2,543
  • 1
  • 20
  • 23
6
votes
1 answer

Using stack for profiling

I'm trying to do some profiling using stack --enable-profiling and I'm a bit confused about what's happening exactly. Do I need to use also --enable-library ?. Also, is it build in a separate directory ?What happend next I build it, will remember…
mb14
  • 22,276
  • 7
  • 60
  • 102