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.
1,203
questions
3
votes
0
answers
54
views
"* Missing (or bad) C library: OpenAL32" - from stack build for a haskell project
I have a stack project using Sound.ALUT. The project was building fine on both Windows and Mac before I added sound. (Sound.ALUT is a library layered over OpenAL.) Got thinks working on MacOS but ...
1
vote
1
answer
85
views
Cannot install my Hakyll blog on Windows (issue with network library)
My Ubuntu laptop is dead. So I'm trying to install the Haskell projects for my Hakyll blog on Windows. I didn't change anything to the source code and the stack.yaml file, and I installed the Haskell ...
1
vote
0
answers
87
views
Sanity check failed when installing Haskell Stack on Windows
I've been trying to install Haskell Stack on Windows, but when I try this command:
>stack setup --resolver lts-18.26
the following error occurs:
The GHC located at C:\Users\Atanasia\AppData\Local\...
0
votes
0
answers
112
views
Haskell package Data.ByteString Issue
So I seen another post where somebody figured this out but they just said they figured it out and I can't.
I need Data.ByteString for a project I'm working on to read a binary file. I get this error ...
0
votes
0
answers
91
views
Unable to Stack Build a Haskell Project when using postgresql-simple
Machine: M1 MacBook Pro
Stack GHC: 9.0.2 (but I have also tried multiple 8.X versions)
For context, I am very new to stack and cabal. I have done MOST of my Haskell work in a pure LeetCode/Math ...
3
votes
1
answer
116
views
Cannot profile a build with stack LTS 19.2 (GHC 9.0.2)
I am trying to build a profilable executable with stack build --profile. stack build, stack test, and stack ghci all work correctly. (Full repo for reference)
I get many errors like the following:
...
1
vote
0
answers
109
views
Why am I getting an ioctl error in Visual Studio but not in Stack while trying to implement multiple test files in Hspec?
I am trying to implement a multi-spec file testing suite for a project in Haskell, using hspec-discover:
-- this goes in Spec.hs
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
This should allow me to ...
0
votes
0
answers
59
views
Stack don't want to build my haskell project
I'm trying to build my haskell stack project (new project), but I get this
Writing implicit global project config file to: /home/toor/.stack/global-project/stack.yaml
Note: You can change the snapshot ...
3
votes
0
answers
61
views
How does Stack handle changes to optimization levels?
If I change the optimization level ghc option, and then build, does Stack recompile all dependencies with the updated optimization level? I have not noticed this happening, but I don't know if I'm ...
1
vote
0
answers
60
views
Haskell stack project with telegram library
I'm new in haskell and I'm trying to create my first project. I want to create haskell telegram bot using this guide from Nikolai Kedesov ( https://github.com/fizruk/lambdaconf-2018-workshop). The ...
0
votes
1
answer
46
views
Running a haskell program in the repl after changing the file
I have a haskell program that defines
module Lib
( someFunc
) where
someFunc :: IO ()
someFunc = do
print "Hello world"
Opening the REPL with stack loads this lib into the context.
*...
-2
votes
1
answer
91
views
How do I add a library to a Stack project? (Haskell)
I know this question has probably been asked a thousand times, but I'm currently learning Haskell, and I'm making a little random number generator / guessing game. I got all the terminal input and ...
1
vote
1
answer
49
views
Why can't GHC find module `Language.Java.Inline.Plugin'
I am trying to stack build using
I am importing inline-java in the extra-deps in stack.yaml, like this:
extra-deps:
- inline-java-0.8.4@sha256:...
0
votes
0
answers
37
views
In Stack, how do I find problematic constraint when "plan construction failed"?
I am not able to build with stack and would love to learn a strategy for resolving. Here is the current error:
In the dependencies for aeson-1.4.7.1:
th-abstraction-0.4.3.0 from stack
...
2
votes
1
answer
62
views
Haskell package Not on Stackage, then how?
I want to use HList: Heterogeneous lists, but the package seems not on Stackage.
I currently use stack. In this case what is the option besides going back to use Cabal?
2
votes
0
answers
39
views
How to change 'sr' directory when installing Facebook / Duckling?
I'm setting up Facebook / Duckling using the Quickstart:
stack build
stack exec duckling-example-exe
When I run the previous commands, the sr folder is created in c:\ directory, which is not desired.
...
0
votes
0
answers
28
views
Haskell Stack can't find PATH because of conda is installed also
I'm learning Haskell Stack in college. I've hit a problem with my $PATH. From what I can tell is because I also have conda installed. What I'm doing, I've installed Haskell Stack fine and follow the ...
1
vote
0
answers
53
views
'stack build' fails on windows with missing regex-pcre dependency
$ stack build
Error is below. I have
$ stack --version
Version 2.7.3, Git revision 7927a3aec32e2b2e5e4fb5be76d0d50eddcc197f x86_64 hpack-0.34.4
How would I know if it were installed non-standard? ...
0
votes
0
answers
44
views
Does stack rerun hpack not only on build but already on change?
I'm using stack with hpack so that .cabal file is generated from hpack's package.yaml. Often times as I want to switch branch I struggle with constantly changing .cabal file.
I run git restore *....
1
vote
1
answer
50
views
stack run in multi package project
Is there a way to specify which executable to run (with stack run) when I am working with a Stack multi package project?
5
votes
1
answer
105
views
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:...
0
votes
0
answers
34
views
`stack bench` vs `stack build mypackage:bench`
Why does
stack bench builds (and run)
and
stack build mypackage:bench tells me
Cabal-simple_mPHDZzAJ_3.4.1.0_ghc-9.0.2: No benchmarks enabled. Did
you remember to configure with '--enable-benchmarks'?...
1
vote
0
answers
72
views
How to fail fast(er) when trying to update a package in Haskell?
Problem
In a very used library
haddock we have
#if MIN_VERSION_ghc(9,2,0) && !MIN_VERSION_ghc(9,3,0)
Those hidden dependencies make it into the built binary.
So, say, haddocset builds just ...
2
votes
1
answer
90
views
How to convert a stack project into a cabal project?
I have created a stack project (with the name TMS) and seems to build. The resolver is "lts-18.25". I have also created manually a cabal.project file in the TMS directory. This file only ...
2
votes
1
answer
68
views
How to build and modify source code locally of a package from Hackage using the `Haskell Stack`?
Background
I downloaded the source files of package (e.g. test-framework) to have a closer look in it's architecture, to modify it for experiments, and may be to contribute later on.
I downloaded the ...
1
vote
2
answers
217
views
Problem with loading module ‘Distribution.Simple’
I was trying to build one new project in Haskell (GHC version 8.10.4, stack version 2.7.3, cabal version 3.6.2.0) using stack, but at the time of running the command stack setup I (surprisingly) got ...
4
votes
0
answers
124
views
Unable to cache stack's build artifacts in build pipelines properly
My stack (haskell) project has a few sub-projects which have their own cabal files. My (self-hosted) gitlab CI runner has stack installed globally and all the builds share the ~/.stack directory, ...
2
votes
1
answer
90
views
I cannot install ffmpeg-light on Windows 10
I'm trying to install ffmpeg-light with Stack, but pkg-config was not found. I'been searching for people with the same problem but none of the answers seemed to fix my problem. This is the output I ...
2
votes
1
answer
104
views
setting up graphics.gloss haskell
I'm new to Haskell, I'm trying to use a library called graphics.gloss
but I keep getting this error and I'm not sure what is the problem exactly.
PS E:\TicTacToeGame> cabal install base-4.2
cabal....
1
vote
0
answers
39
views
stack: download dependencies to repo to transfer on other machine
I would like prepare a haskell project repository, currently using stack, such that it includes already all dependencies and stack can run without internet connection.
Background: The project ...
0
votes
1
answer
104
views
stack setup won't recognize changes in .cabal file
I've added "QuickCheck" to the "build depends" section of the .cabal file but when I do stack setup the "QuickCheck" section of the file gets removed and I get this error:...
1
vote
1
answer
167
views
Failed to build Distribution.Simple package using stack in Haskell
the stack command stack new my-project creates a auto-generated file Setup.hs with contents:
import Distribution.Simple
main = defaultMain
but my vs code intellisense just tells me
Could not load ...
2
votes
1
answer
111
views
Haskell stack in a project-specific location
I'm following the guide here, which tells me:
The stack setup will download the compiler if necessary in an isolated
location (default ~/.stack) that won't interfere with any system-level
...
1
vote
0
answers
125
views
How to build stack projects with external libraries on M1
I have a project that depends on the Hapstone package, which in turn depends on the Capstone library.
I build capstone like this:
cd /Users/ds3/Opt/
git clone https://github.com/capstone-engine/...
4
votes
0
answers
107
views
How to disable certificate validation in stack?
I am trying to set up CI on GitLab. It's only meant to verify the project can build, run and tests are passing. No artifacts are saved and the runner has timeout 1h, so I don't care about security of ...
2
votes
1
answer
203
views
Haskell FFI: Missing (or bad) C library
I am trying to bind to a C library in Haskell, using the FFI, but am getting "Missing (or bad) C library".
I am using Haskell Tool Stack 2.7.3 on Ubuntu Linux. I have made a minimal ...
0
votes
1
answer
141
views
Haskeline throws linking error in stack build
I'm trying to build haskell project via stack build command, but it throws excepton:
-- While building package %some secret project name%-0.1.0.0 (scroll up to its section to see the error) using:
...
0
votes
1
answer
255
views
Why doesn't stack (installed by ghcup) find msys (installed by ghcup) on Windows
On my Windows 10 system, I set up Haskell using GHCup. I installed ghc, cabal and stack. Now I am trying to install a package depending on network. Network needs msys for building, but it is obviously ...
1
vote
1
answer
28
views
Installing a customized version of Cabal and use it for stack
I'm trying to build stack against a customized version of Cabal. For that I first tried to install my customized Cabal version out of the modified git tree via cabal install --project-file=cabal....
1
vote
0
answers
97
views
Windows: gcc.exe failed in phase Linker when Stack Run Rio Template
I downloaded and installed stack using the installer on Windows.
I then try to run:
$ stack new new-project rio
$ cd new-project
$ stack run
This leads to this error:
WARNING: Ignoring ...
0
votes
1
answer
54
views
On a stack's package file, what is the difference between library and executables dependencies?
In Haskell, while using stack, there are three places where we can define dependencies on the package.yaml file; under library and executables. What is the difference between defining a dependency in ...
2
votes
1
answer
55
views
How to push my Haskell Stack build to Cachix
I made some backend using Stack.
My Stack project succeeds when I do stack build --nix and it seems to create a nix package in local project cache directory in which executable is built. (.stack-work/...
0
votes
1
answer
52
views
ClassyPrelude.hs:229:1: error: Failed to load interface for ‘Data.Textual.Encoding’
Does anyone know why this application won't properly install? Thanks for you any help you can provide.
Brok is a web crawling program to check if files contain any broken links, I utilize it to check ...
13
votes
1
answer
798
views
Could not find module System.Console.MinTTY.Win32 when compiling test-framework with Stack on Windows
I'm getting an error when attempting to compile Haskell tests using test-framework on Windows.
Steps to reproduce
Create a new library using Stack:
$ stack new repro simple-library
Then navigate into ...
0
votes
1
answer
100
views
What to do so I can import Data.List.Split module in Haskell
I am new to Haskell, I am thinking to do a small project of processing the spreadsheet data to improve my Haskell. However I don't know how to import the module needed which is the Data.List.Split so ...
4
votes
0
answers
48
views
haskell stack to make executables for a project that do not use the library
I have a haskell project that is mainly a library. To run some benchmarks I also have some small utilities for checking that some results are correct, also written in haskell. These utilities do not ...
3
votes
1
answer
343
views
How to run stack ghci on WSL?
I installed Haskell stack in WSL (Ubuntu 20.04.3 LTS on Windows 10).
After that, I successfully installed stack using command curl -sSL https://get.haskellstack.org/ | sh
However, after I tried to run ...
3
votes
0
answers
37
views
Graphite causes error due to empty interfaces
The problem I have is that I add the graphite dependency to a fresh project and it fails to build. Why does this happen and what can be done to rectify it?
To reproduce
Run stack new project.
Run cd ...
0
votes
0
answers
63
views
Haskell stack test cabal file inro not found
I got this message after trying to run stack test. Now I don't know what to do
Cabal file info not found for tasty-1.4.2@sha256:b124f1f5db8291e547254e3b52e94e091fb020b97421c6824fcb9df3a9d143a8,2688, ...
1
vote
0
answers
130
views
How to create executable from llvm ir (*.ll) files produced by GHC llvm backend using llvm commands?
I'm using stack. When i pass -keep-llvm-files to GHC, i get Main.ll, Lib.ll, and Paths_projectname.ll. How would i use these to create an executable using llvm commands such as llvm-link, llc, and ...