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

intero error: wrong-type-argument stringp nil

I'm trying to get intero running. After install, opening a Haskell file from an existing stack project results in: Debugger entered--Lisp error: (wrong-type-argument stringp nil) signal(wrong-type-argument (stringp nil)) flycheck-buffer() …
Maxim
  • 173
  • 5
5
votes
0 answers

How can I set up Haskell stack to use the system compiler+libraries?

More broadly, I'd like to be able to use Haskell Stack as a build tool for projects in a university class. The main issue I've run into is when students try to use Haskell stack to build their project, they very quickly run up against their space…
Ben MacAdam
  • 151
  • 3
5
votes
2 answers

How to use the Tsinghua mirrors of Hackage and Stackage with Haskell Stack package manager

I'm using version 2.1.1 of the Haskell Stack package manager. Tsinghua University provides a mirror of Hackage that is available behind the Chinese firewall, as described on https://mirrors.tuna.tsinghua.edu.cn/help/hackage/. When I follow those…
LogicChains
  • 4,332
  • 2
  • 18
  • 27
5
votes
2 answers

Haskell with emacs org-mode: Variable not in scope

After wandering off in frustration from before, I've decided to try Haskell in Emacs org-mode again. I'm using Haskell stack-ghci (8.6.3), Emacs 26.2, org-mode 9.2.3 set up with intero. This code block #+begin_src haskell :results raw :session…
147pm
  • 2,137
  • 18
  • 28
5
votes
0 answers

How to resolve dependency tree with different version ranges of same packages?

I'm trying to set up a happstack-lite application using stack. I initialized project with these commands: stack new my-happstack cd my-happstack stack setup I changed package.yaml so it contains: dependencies: - base >= 4.7 && < 5 - happstack-lite…
Gera
  • 95
  • 4
5
votes
1 answer

Stack build hangs on GHC-8.6.4/Cabal-2.4.1.0 on Windows

My stack project build hangs on windows at the step related to Cabal. See output below C:\haskell\hrt\Comonad>stack ghc -- --version The Glorious Glasgow Haskell Compilation System, version 8.6.4 C:\haskell\hrt\Comonad>stack…
user11323942
5
votes
1 answer

Can I somehow use a package with a later version of base than what the package specifies?

I'm quite new to the Haskell stack, so I might be misunderstanding how things are intended to work here, but I have a problem that I've seen a few times and am wondering if I'm going about the wrong way. In short, I sometimes want to use a package…
Tomas Aschan
  • 58,548
  • 56
  • 243
  • 402
5
votes
1 answer

How to define multiple executables / Main modules with stack/hpack

I use stack and a package.yaml file for hpack to compile my haskell project. It has three executables backed by one library. As one would expect the executables are all defining a Main module: $ head -n1 app/* ==> app/Foo.hs <== module Main…
Lucas
  • 685
  • 4
  • 19
5
votes
1 answer

How to pass environment variables into Haskell programs run via stack?

I just noticed that Haskell programs run via stack do not receive environment variables from the calling environment. Here's a sample program: -- testenv.hs import System.Environment main :: IO () main = print =<< getEnv "FOOBAR" If I run it…
chrisleague
  • 558
  • 2
  • 15
5
votes
1 answer

How to exclude dependencies when building haddocks?

Is there any way to build haddock docs for specific packages? I'm trying to build haddocks for my package/app alone, but the following command seems to be doing this for all dependencies, as well: stack haddock webservice (where webservice is the…
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
5
votes
1 answer

Haskell and Docker reasonable deployed image size?

I had tried building a PoC Happstack executable running in Google App Engine using this Dockerfile: FROM ubuntu:14.04 ENV APP_ROOT=/usr/share/app RUN apt-get update && apt-get install curl -y && curl -sSL https://get.haskellstack.org/ | sh COPY .…
ryachza
  • 4,460
  • 18
  • 28
5
votes
2 answers

How to generate .cabal file from package.yml

I removed package.yml file to use .cabal file instead. Now I'd like to try defining everything in package.yml, and let stack to generate .cabal file auatomatically. But when I manually converted .cabal file to package.yml and delete .cabal file and…
Leo Zhang
  • 3,040
  • 3
  • 24
  • 38
5
votes
1 answer

`gcc' failed in phase `Linker', can't build 'hint' package

So, my package.yaml includes - hint package. Then I try to stack build my project. Log: Configuring hint-0.7.0... Preprocessing library for hint-0.7.0.. Building library for hint-0.7.0.. [ 1 of 18] Compiling Control.Monad.Ghc (…
Zazaeil
  • 3,900
  • 2
  • 14
  • 31
5
votes
3 answers

Where can I find correct package name and version for Haskell?

Say, I need System.Eval.Haskell. Or whatever else. How do I know which package I should specify in my package.yaml? When I go to the https://hackage.haskell.org/package/plugins-1.5.7/docs/System-Eval-Haskell.html, I see no package name. P.S.…
Zazaeil
  • 3,900
  • 2
  • 14
  • 31
5
votes
2 answers

Cannot build a hello world program with Stack because of flag bytestring--lt-0_10_4

With a bare "hello world" project generated by stack new myproject simple whenever I run stack setup, stack init or stack build I have the following error all the time: Downloading lts-10.0 build plan Downloaded lts-10.0 build plan. AesonException…
Stephane Rolland
  • 38,876
  • 35
  • 121
  • 169