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
161
votes
3 answers

What is the difference between Cabal and Stack?

Yesterday I learnt about a new Haskell tool called Stack. At the first blush, it looks like it does much the same job as Cabal. So, what is the difference between them? Is stack a replacement for Cabal? In which cases should I use Stack instead of…
ZhekaKozlov
  • 36,558
  • 20
  • 126
  • 155
72
votes
4 answers

Profiling builds with Stack

How do I tell stack to build my executable and all its dependencies with -prof? Simply adding it to ghc-options in the .cabal file is not enough, because it only tries to build the executable with profiling enabled, which fails.
Sebastian Graf
  • 3,602
  • 3
  • 27
  • 38
67
votes
3 answers

How to install a package using stack?

Using cabal, I could install hakyll with the command: cabal install hakyll How can I do the same thing using stack?
Ben
  • 3,612
  • 3
  • 19
  • 24
46
votes
3 answers

How to use a DLL in a Haskell project?

I would like to use an external library, RDFox, in a Haskell project. Context: I am working on Windows and Linux, both 64 bits, using GHC 7.10 and stack. RDFox is programmed in C++. RDFox shared libraries (.dll, .so) can be downloaded with Java and…
Der Vogel
  • 460
  • 3
  • 6
41
votes
1 answer

How to install/use a local version of package using Stack?

The situation is, I am trying to install Netwire using Stack. However, there is a problem in the latest netwire 5.0.1, as reported by dhobbs: http://hub.darcs.net/ertes/netwire/issue/13 Since I don't know when the problem will ever be fixed, I…
Carl Dong
  • 1,299
  • 15
  • 26
35
votes
1 answer

How to uninstall a Haskell package installed with stack?

How can I uninstall a Haskell package installed globally with stack tool? stack --help shows that uninstall command is deprecated. uninstall DEPRECATED: This command performs no actions, and is present for…
Kwang Yul Seo
  • 771
  • 2
  • 7
  • 15
35
votes
4 answers

Haskell Stack install package dependency from github

Is it possible to install a version of a package from github using Haskell stack? e.g. in a .cabal or a stack.yaml file, how can I point a dependency at a git repo/branch/revision?
Abraham P
  • 15,029
  • 13
  • 58
  • 126
35
votes
2 answers

Generating documentation for my own code with Haddock and stack

I have annotated my code in Haddock style and would like to generate browse-able documentation. Since I am also using stack, I want to integrate the documentation generation into the workflow. However, I have not yet been able to generate anything…
Sam van Herwaarden
  • 2,321
  • 14
  • 27
32
votes
1 answer

Understanding Haskell's stack program and the resolver and LTS version

I am trying to understand how to use stack and stackage.org. When I first installed it and used it, stackage.org was at LTS-3.8 (the "resolver"). Since then, stackage.org now has LTS-3.11. First, I'd like to confirm what this means. Stackage is a…
user1002430
31
votes
2 answers

How do I check what version of a package is installed with stack?

Within my project's .cabal file I've got the following under the executable section: executable ArchPkgstatsScraper hs-source-dirs: app main-is: Main.hs ghc-options: -threaded -rtsopts -with-rtsopts=-N build-depends:…
Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286
29
votes
3 answers

Could not find module `Data.Map' -- It is a member of the hidden package

First, I created a new workspace: stack new xxxx stack init stack build then cd xxx\app stack ghci import Data.Map I can import other modules like Data.Char and Data.List, but I can't import Data.Map. GHCi told me: Could not find module…
AurevoirXavier
  • 2,543
  • 2
  • 17
  • 25
28
votes
1 answer

What goes in a Stack package.yaml file?

I notice that Stack supports using a package.yaml file that it will use to generate a .cabal file. For example, yi-core/package.yaml. Its structure seems very similar to a Cabal file, but not quite the same. Some of the keys have been renamed (for…
Chris Martin
  • 30,334
  • 10
  • 78
  • 137
25
votes
3 answers

stack new command failing to download build plan for lts-14.1

Stack fails with a 404 HTTP status to download a build plan for lts-14.1: $ stack new my-project [...] Downloading lts-14.1 build plan ... RedownloadInvalidResponse Request { host = "raw.githubusercontent.com" port …
michid
  • 10,536
  • 3
  • 32
  • 59
25
votes
2 answers

How to install Haskell (Platform or Stack) in 2018 on Linux?

I am trying to learn Haskell from the book Learn You a Haskell by Miran Lipovača. Both the book and haskell.org recommends installing the Haskell Platform but there is no download for Manjaro Linux (Arch based) which I use. I found this guide from…
Klorax
  • 579
  • 2
  • 6
  • 10
25
votes
2 answers

How to Run Multiple Test Files with Haskell Stack Project

I want to setup an existing Haskell project with Stack. The existing project uses multiple files under a test directory; these separate test files by default, Stack (or cabal?) appears to utilize a single test/Spec.hs for testing. How can I continue…
1ijk
  • 1,417
  • 2
  • 19
  • 31
1
2 3
84 85