How to get GHC command as issued by Cabal/Stack?

GHC can be used as a linter for the Neovim plugin ale. The configuration uses the following command to lint a file: stack ghc -- -fno-code -v0 %t where %t is the file in question. This is fast and pretty great, however, it doesn't recognize any of...
more »

2017-02-14 06:02 (1) Answers

Haskell Stack package installation error

user$: stack install dictionaries Error: While constructing the build plan, the following exceptions were encountered: In the dependencies for dictionaries-0.1.0.0: binary-0.8.3.0 must match >=0.7.5 && <0.8 (latest applicable is 0...
more »

2017-02-09 17:02 (2) Answers

ghc failed to compile a sanity check

I've recently been trying to use haskell-stack, but whenever i try to do stack setup i get The GHC located at /home/piotrek/.stack/programs/x86_64-linux/ghc-8.0.1/bin/ghc failed to compile a sanity check. Please see: http://docs.haskellstac...
more »

2017-02-04 17:02 (0) Answers

Why doesn't Stack allow relative paths?

I'm working on a library which depends on an external C library, and would like to bundle the headers and lib files with my project. The stack.yaml file requires all paths to be absolute, which is clearly not ideal for this purpose. As per @adamse's...
more »

2017-02-04 12:02 (0) Answers

Stack installing cairo for threadscope

I started installing threadscope through stack (rather than cabal, is that OK? https://wiki.haskell.org/ThreadScope). threadscope requires cairo. $ stack install cairo cairo-0.13.3.1: configure -- While building package cairo-0.13.3.1 using: ...
more »

2017-01-29 11:01 (2) Answers

Stack not resolving dependencies properly

I'm trying to set up Hakyll on a fresh Ubuntu 16.04 instance, but I can't seem to get the Stack-based setup instructions right. Starting out with stack install hakyll, I get: Error: While constructing the build plan, the following exceptions were e...
more »

2017-01-21 07:01 (2) Answers

Haskell Stack Local Server

I am behind a firewall with strict rules about downloading software from the internet, so I would like to know if it is possible to download an entire stackage LTS snapshot in one go and serve it on a local server, to which we could then point the st...
more »

2017-01-19 18:01 (0) Answers

Snapshot builds of stack available?

I need to use stack 1.3.3 in Travis CI due to a complication issue. The fix is not present in 1.3.2 and 1.3.3 has not been released yet. Currently, I am building stack myself from the source code in my Travis configuration. This adds time to the buil...
more »

2017-01-16 21:01 (0) Answers

Haskell stack and GHC.Paths.libdir

I am asking GHC for the lib path and it gives me a path that doesn't exist: bash-3.2$ stack eval GHC.Paths.libdir unknown option: 'c' "/Users/alexey/haskell/ghc-7.10.3/lib/ghc-7.10.3" This folder does not exist, not in my PATH and doesn't appear a...
more »

2017-01-13 14:01 (0) Answers

avoiding recompilation when types don't change

I have a large Haskell project with many packages built with stack. I have long recompilation times when I make trivial changes in a core model or some configuration data without changing any types. If this were C, I would have to only recompile the...
more »

2017-01-09 00:01 (0) Answers

haskell stack - random numbers package

We are new users trying to use random numbers in a new stack project, but cannot import System.Random. It doesn't seem to be in the curated set(?) We've got a new stack project setup as in the user manual. We've edited the cabal file putting random ...
more »

2017-01-04 18:01 (0) Answers

Haskell yesod Database settings

This is the first time I try to install Haskell yesod but I run through some problems $ yesod devel /usr/bin/ld: /home/romano/.stack/programs/x86_64-linux/ghc-tinfo6-7.10.3/lib/ghc-7.10.3/rts/libHSrts.a(Scav.o): relocation R_X86_64_32S against `.ro...
more »

2016-12-30 00:12 (0) Answers

Using a private git repository with Stack

I'm trying to configure stack to use the Haskell packages of a private git repository. Looking at the documentation it seems that the git repository can be added as local dependency. The problem is that I see no way of specifying the credentials for ...
more »

2016-12-28 23:12 (1) Answers

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 projec...
more »

2016-12-28 21:12 (0) Answers

Installing zlib using stack: recompile with -fPIC

When I run stack --resolver=lts-7.14 install zlib I'm getting message saying that package should be recompiled with -fPIC flag: Configuring zlib-0.6.1.2... Building zlib-0.6.1.2... Preprocessing library zlib-0.6.1.2... /usr/bin/ld: .stack-work/di...
more »

2016-12-28 17:12 (1) Answers

GLURaw failing due to missing header file

I'm trying to use gloss which depends on GLURaw, and getting this error: stack install --extra-lib-dirs=/usr/lib/nvidia-367 --extra-lib-dirs=/usr/lib/x86_64-linux-gnu /tmp/stack1018/GLURaw-2.0.0.2/cbits/HsGLURaw.c:74:20: error: fatal error: GL...
more »

2016-12-23 08:12 (0) Answers