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
10
votes
2 answers

Haskell stack and version control

I'm new to Haskell and Stack. When creating a new project using stack new which files should be checked in to git (or any other VCS)? The whole dir?
dimid
  • 7,285
  • 1
  • 46
  • 85
10
votes
1 answer

How do I add the "containers" package to my .cabal file (without getting overwritten by stack at compile time)?

I am working on the "roman-numerals" task from the exercism Haskell track and followed their instructions to installing stack. I am working on a Fedora 24 box. As long as I was working with Haskell modules from base, I didn't have a problem. Now I…
ktiu
  • 2,606
  • 6
  • 20
10
votes
0 answers

passing flags to alex and happy via stack

I am trying to move a project from cabal to stack. It was painless up until I tried to make alex use a custom wrapper. Now I'm stuck. I used to use cabal build --alex-options=".." to pass them on, but that option is not there with stack (stack…
orm
  • 2,835
  • 2
  • 22
  • 35
10
votes
1 answer

Can I compile a Haskell project in release mode with Stack?

I wonder, isn't there a way to compile a Haskell project in release mode with Stack? There's no nothing related to "release" in stack --help. How can I compile it in Release mode then?
user266003
10
votes
2 answers

stack ghc error "Invalid Option `--make`

I am learning Hakyll a library in Haskell. I need to run ghc --make site.hs However, I instlled ghc with Stack so I can no longer run ghc but instead stack ghc $ stack ghc --make site.hs Invalid option `--make' How am I supposed to compile my…
john mangual
  • 7,718
  • 13
  • 56
  • 95
10
votes
3 answers

How can I increase the stack size with runhaskell?

I'm writing some disposable Haskell scripts to solve some of the Project Euler problems. I don't really want to have to compile them because of the number of changes I'm constantly having to make, but in a few cases I've found that I've run out of…
Gregory Higley
  • 15,923
  • 9
  • 67
  • 96
9
votes
2 answers

Multiple files use the same module name:

when I type stack run I get no error message but when I type stack ghci I get this error about multiple files use the same name , how I can solve it ? (base) wejden@wejdenaydi:~/wejden$ stack ghci Using main module: 1. Package `wejden' component…
Wejdene
  • 93
  • 4
9
votes
2 answers

Stack (Haskell) build cache of source files with GitHub Actions

When building my Haskell project locally using stack build, only the changed source files are re-compiled. Unfortunately, I am not able to make Stack behave like this on GitHub Actions. Any suggestions please? Example I created a simple example with…
9
votes
1 answer

stack run with profiling in haskell

I tried running $ stack build --profile && stack run myexec --rts-options -p But I get ... Registering library for mylibrary-0.1.0.1.. Completed 2 action(s). myexec: the flag -p requires the program to be built with -prof ... I know I could…
fakedrake
  • 6,528
  • 8
  • 41
  • 64
9
votes
1 answer

How to link to a C# (i.e., managed) DLL from Haskell?

I am trying to build a Windows DLL from my Haskell code. The functions in this DLL are supposed to be called from a managed code in C#. And, atleast one of the function (defined in the c# code) is to be called from a function in this DLL. At the…
arvindd
  • 346
  • 2
  • 8
9
votes
1 answer

Generating a Nix package from a stack project

I have a software application that can be built and installed with stack. I would like to offer a binary package as well for Linux and Mac. For this purpose I'm considering nix, since, among other things, it can be used in Linux and Mac. This will…
Damian Nadales
  • 4,907
  • 1
  • 21
  • 34
9
votes
4 answers

How to use different ghc builds with stack?

I would like to have different, non-ABI-compatible, builds of the same version of GHC, and use them in different projects. (In my case, the difference between the builds is integer-simple vs gmp.) The comments in this issue show how to add a custom…
Roman Cheplyaka
  • 37,738
  • 7
  • 72
  • 121
9
votes
1 answer

Should I use stack to build and upload to Hackage?

Over time I've developed a messy system level Haskell installation that I'm not sure how to completely clean up. But for the most part this isn't of much concern as I simply use stack to manage per-project Haskell configurations. However as my…
orome
  • 45,163
  • 57
  • 202
  • 418
9
votes
1 answer

Can I use Haskell's stack to compile and run _only_ the tests?

When I run a stack test or a stack test : then the output looks something like: package: configure (lib + exe + test) package: build (lib + exe + test) package: copy/register package: test (suite: tests) And it ends up…
Myrn
  • 123
  • 4
8
votes
1 answer

VSCode no intellisense in haskell extension for additional modules

Is there a way to make intellisense work for additional modules (anything outside the prelude) like Quicktest or Random in VS Code? I am using: VSCode: Version 1.55.0 the extension "Haskell v1.2.0" (with haskel-language-server) ghci: GHCi, version…
Kraego
  • 2,978
  • 2
  • 22
  • 34