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 to use "-ddump-minimal-imports" with stack

I am such a big fan of stack, that I've removed any independent cabal and ghc executables completely from my machine (letting stack install whatever it needs in its own mysterious ~/.stack/ directory).... However, it looks like some flags aren't…
jamshidh
  • 12,002
  • 17
  • 31
6
votes
1 answer

Why doesn't stack add packages to the ghc package database?

I've decided to try giving stack a shot. I've installed it and used it to install the latest version of ghc. I've used stack to install some packages but the packages are not visible to ghc and when I list packages with ghc-pkg I see that the…
user467526
  • 517
  • 5
  • 19
5
votes
1 answer

Haskell stack C++ linking fails

I am trying to write a Haskell library and am getting the error message in stack ghci: ghci> functionThatCalls_cSmithNormalForm 0 ghc-9.4.5: ^^ Could not load 'csmith_normal_form', dependency unresolved. See top entry above. GHC.ByteCode.Linker:…
Anai
  • 53
  • 6
5
votes
1 answer

ghc-9.2.5 is not supported by haskell plugin in vscode but I can't use other ghc versions

I'm new to Haskell and I am trying to setup haskell plugin in vscode using official haskell plugin but I came with up some problems with setting up code hinting and syntax recognition of hls plugin. I have already installed ghc-9.2.4 and 9.2.3(by…
Nayami
  • 51
  • 2
5
votes
1 answer

Unable to Install Facebook Duckling on Windows - Stack Exec Fails

I'm trying to setup Facebook Duckling on Windows 10. When I execute: stack exec duckling-example-exe it produces the following error: duckling-example-exe.EXE: /etc/zoneinfo/: getDirectoryContents:findFirstFile: does not exist (The system cannot…
Bradford Griggs
  • 439
  • 2
  • 15
5
votes
0 answers

Can I generate a "fully exposed" and "normal" version of Haddock docs without recompiling?

I am using Haddock (w/ Stack) to generate documentation for a software suite I'm working on. I would like to generate 2 variants of the Haddock docs; one normally (e.g., vanilla stack haddock), and one with fully exposed modules (e.g., stack haddock…
Jason
  • 51
  • 1
5
votes
1 answer

How to create binary distributions of applications with cabal (the tool) or stack

I've written an application in Haskell and it's starting to become slightly useful to users. However my application isn't targeted at technically adept folks, let alone Haskell developers, so building my application from source isn't really…
Kritzefitz
  • 2,644
  • 1
  • 20
  • 35
5
votes
0 answers

How can I copy a Haskell project managed with stack to another device for development?

I would like to move Haskell projects between my work computer and my laptop on a USB stick. I'm using the stack build system. My laptop is very often away from the Internet, sometimes when I initially insert the USB, so if I just copy the project,…
Ari Fordsham
  • 2,437
  • 7
  • 28
5
votes
1 answer

how to achieve `stack run --file-watch`

I work with Haskell stack and found the --file-watch opton, but was then surprised that it works for build but not for run. Searching on the web indicates that there are some ways to achieve the effects of stack run --file-watch with other commands…
user855443
  • 2,596
  • 3
  • 25
  • 37
5
votes
1 answer

Installing Aeson package using Stack

To use Json, I want to install the Aeson package. In the package.yaml file I added - aesonto the dependencies: section, and I got a whole load of errors, which I cannot find online like: "But this GHC boot package has been pruned". I tried to…
The Coding Wombat
  • 805
  • 1
  • 10
  • 29
5
votes
0 answers

Producing multiple executables from a single stack project - HASKELL

I am trying to produce two executables from the same haskell stack project named 'trial'. The structure of my stack project is as follows: $~/trial$ tree . ├── app │   ├── First.hs │   └── Second.hs ├── ChangeLog.md ├── LICENSE ├── package.yaml ├──…
5
votes
1 answer

Can I persuade stack / ghci to *only* load the local .ghci file?

I have a .ghci in my local project directory, and another one in my $HOME. When I do a stack ghci, then $HOME/.ghci is loaded first, followed by $PWD/.ghci. Is it possible to have ONLY the local .ghci be loaded, and the global one ignored? I could…
user1934428
  • 19,864
  • 7
  • 42
  • 87
5
votes
2 answers

Build failed with NonZeroExit 77 when installing Haskell on Mac, ghcup --cache install" failed

Does anyone know how to fix this error? I am currently trying to install Haskell on Mac using the instructions from https://www.haskell.org/ghcup/. Installation starts with the following command line: curl --proto '=https' --tlsv1.2 -sSf…
JustinK98
  • 61
  • 1
  • 3
5
votes
1 answer

category-extras needed, but the stack configuration has no specified version

I am writing a small Haskell program which need import two modules Control.Functor.Algebra and Control.Morphism.Hylo. I searched the google. These two modules can be found in category-extras. So I added category-extras to…
chansey
  • 1,266
  • 9
  • 20
5
votes
2 answers

How to get rid of annoying startup message from stack ghci?

I'm using stack ghci to start my REPL, based on the answer I got for my question on how to import a module installed with stack. This works fine, but I get initially a warning message Note: No local targets specified, so a plain ghci will be started…
user1934428
  • 19,864
  • 7
  • 42
  • 87