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

Is it possible to design Stack (Haskell) just like NPM (NodeJS)?

The Haskell Tool Stack is the most popular Haskell package manager for now, it's main goal is to make building haskell packages reproducible. But the way stack approach it's goal is to find a huge no-conflict-set of package-revisions, and call it…
luochen1990
  • 3,689
  • 1
  • 22
  • 37
6
votes
1 answer

Haskell standalone executable without using 'stack exec'

How would one go about creating an executable from a stack generated framework (stack new myprog simple)? myprog.cabal shows myprog as executable that can be executed using stack exec myprog. However: using ./myprog will not work. Not unless I call…
Madderote
  • 1,107
  • 10
  • 19
6
votes
2 answers

Get Stack to pass test suite name as part of --test-arguments

It's possible, with cabal, to set up a continuous build that records test successes/failures in a format many CI systems will accept with a command like: cabal test '--test-option=--jxml=test-results/$test-suite.xml' The important part here is that…
Daniel Martin
  • 23,083
  • 6
  • 50
  • 70
6
votes
2 answers

How to I change the default GHC compiler version on Stack

I am trying to set an enverionment for Haskell and I installed stack. After the installation I realized the GHC 8.6.4 version is not the one that I need (8.0.2). compiler-exe: /home/manny/.stack/programs/x86_64-linux/ghc-tinfo6-…
user1657666
  • 351
  • 2
  • 9
6
votes
4 answers

Installing IHaskell kernel for jupyter notebooks -lgmp cannot be found by Linker

I'm trying to install IHaskell in jupyter, directly from instructions here. I ran the following. sudo apt-get install -y python3-pip git libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev libmagic-dev libblas-dev liblapack-dev git clone…
Mittenchops
  • 18,633
  • 33
  • 128
  • 246
6
votes
1 answer

What does tinfo6 stands for?

Working with Haskell and particularly GHC I can see tinfo6 word quite often. Mostly it appears in arch-vendor-os triple x86_64-linux-tinfo6 like if it was some sort of OS. But what really does tinfo6 mean?
ratijas
  • 704
  • 7
  • 14
6
votes
1 answer

How to include a dependency C library in Haskell Stack

I want to create a Haskell Stack package that includes another Haskell Stack package as an extra-dep. The problematic thing is that the package that i'm trying to include is a binding to some C code, using Haskell's FFI. If I just stack unpack and…
6
votes
1 answer

Is there a way to get GHC error messages properly formatted on powershell terminal when built with stack?

Building with ghc prints beautifully formatted error messages on powershell (as in other terminals): PS > ghc .\src\XXX.hs -package ghc -package ghc-paths -package filepath [1 of 1] Compiling XXX ( src\XXX.hs, src\XXX.o…
user3048859
  • 192
  • 6
6
votes
2 answers

How to enable language extensions / pragmas project wide by default?

Is there a way to put {-# LANGUAGE #-} pragmas in either the: .cabal, or stack.yaml file, to avoid repeating the same header code in every *.hs file of a project?
dbanas
  • 1,707
  • 14
  • 24
6
votes
2 answers

Haskell-Stack: Access violation error during build

I've been trying to build my Haskell project for the last couple days using stack and I'm getting an access violation error. From what I understand I have the latest stack version and GHC. This was all originally working until I added a library to…
Michael
  • 3,411
  • 4
  • 25
  • 56
6
votes
1 answer

Conditional Compilation in Haskell submodule

I'm trying to have a submodule in my program compile conditionally to switch small parts of the code between release builds and development builds. Currently I'm attempting to use cpphs however when I change the flags passed into GHC to define a…
6
votes
2 answers

Intero: ghc from stack configuration does not match

When intero-mode tries automatically installing Intero, it produces the following error: Intero is not installed in the Stack environment. Installing intero-0.1.23 automatically ... Error: While constructing the build plan, the following…
bradrn
  • 8,337
  • 2
  • 22
  • 51
6
votes
1 answer

Executable named yesod not found on path

Getting this issue while trying to run my Yesod application. stack build has already been run and gives no output anymore. $ stack exec -- yesod devel Executable named yesod not found on path: ["path/to/app"]
Qwertie
  • 5,784
  • 12
  • 45
  • 89
6
votes
2 answers

How to run an individual test with Stack and Haskell Test.Framework?

I'm cloning the following repository and making one change to the stack.yaml by adding at the end: docker: enable: true To run all the tests for haskoin-core I'm using stack test haskoin-core:test-haskoin-core What I want to do is run just one…
hawkeye
  • 34,745
  • 30
  • 150
  • 304
6
votes
1 answer

Missing debug symbols in statically linked binary

I'm building statically linked binary using stack and I try to add debug symbols to it (following: https://downloads.haskell.org/~ghc/master/users-guide/debug-info.html). However GDB reports: no debugging symbols found. What am I missing? I've added…
carbolymer
  • 1,439
  • 1
  • 15
  • 30