haskell-stack

Is there a declarative way to specify packages to be installed into global-project using Haskell stack?

故事扮演 提交于 2019-12-11 08:43:00
问题 Stack allows global installation of packages using stack install <packagename> outside of a project directory. Stack also has a ~/.stack/global-project/stack.yaml file that allows configuration of the global-project. However I can't see a way to "install" packages declaratively. The extra-deps and packages key in the yaml file don't seem to work for this method. Instead I just have to run stack install <...> <...> each time the snapshot version gets updated for my global-project. 来源: https:/

`stack build` failed due to `Undefined symbols for architecture x86_64` on Mac OS X using nix

冷暖自知 提交于 2019-12-11 06:03:41
问题 First the error messages: $ stack build Linking /Users/yuzhao/.stack/setup-exe-cache/x86_64-osx/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4 ... clang-5.0: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument] clang-5.0: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument] Undefined symbols for architecture x86_64: "_iconv", referenced from: _hs_iconv in libHSbase-4.11.1.0.a(iconv.o) (maybe you meant: _base

Why do I have to remove `ekg` from build-deps for haskell stack/cabal to find my dll on Windows?

大憨熊 提交于 2019-12-11 04:12:30
问题 I'm building a Haskell 7.10 project that depends on tdsodbc.dll, using stack v1.7.1 on Windows, everything 64-bit. I have tdsodbc.dll in the lib folder of the project, and extra-lib-dirs: lib and extra-libraries: tdsodbc in the .cabal. But when I compile, I get Missing C library: tdsodbc when stack runs cabal configure . I've tried putting extra-lib-dirs: [lib] in stack.yaml , and I can see from that configure command that it has put --extra-lib-dirs=C:\Users\Kevin\src\theproject\lib on the

Error installing the shuffle library with stack

半城伤御伤魂 提交于 2019-12-11 02:12:08
问题 Using stack 1.2.0 and LTS 7.0 I'm getting the following error installing the shuffle library: $ cabal get shuffle $ cd shuffle-0.1.3.3 $ stack build ... /tmp/shuffle-0.1.3.3/Setup.hs:2:1: error: Failed to load interface for ‘Distribution.Simple.UUAGC’ Perhaps you meant Distribution.Simple.UHC (from Cabal-1.24.0.0) Distribution.Simple.GHC (from Cabal-1.24.0.0) Distribution.Simple.JHC (from Cabal-1.24.0.0) Use -v to see a list of the files searched for. /tmp/shuffle-0.1.3.3/Setup.hs:3:1: error:

Use dependencies in Hint when Installing

梦想与她 提交于 2019-12-11 00:48:07
问题 I'm writing a project using Haskell, stack and hint . I'm using hint to interpret a user-supplied module. The catch is that this module uses types and functions from a dependency. When I run my program using stack exec , everything works fine. However, when I install my program (using stack install --local-bin-path bin ) and try to run the executable generated, the GHC interpreter fails with an error: Could not find module <module> . This is because (I think) it can't find the files needed

Building project dependent on gtk2hs fails on lts-7.8 and later

荒凉一梦 提交于 2019-12-10 23:46:14
问题 Building project dependent on glib fails on lts-7.8 and later after Cabal becomes 1.24.1.0. Steps to reproduce Add glib to a project's .cabal file build-depends: base , gtktest , glib Run following commands stack install gtk2hs-buildtools stack build Result The following error occurred ... [debug] Ignoring package Cabal due to wanting version 1.24.1.0 instead of 1.24.0.0 @(Stack\Build\Installed.hs:196:5) ... -- While building package glib-0.13.4.1 using: C:\Users\foo\AppData\Local\Programs

deriving Generic doesn't work even though DeriveGeneric is on

余生颓废 提交于 2019-12-10 16:18:27
问题 I'm trying to follow the tutorial for the Beam Haskell library: https://tathougies.github.io/beam/tutorials/tutorial1/ module Lib ( someFunc ) where {-# LANGUAGE DeriveGeneric , GADTs , OverloadedStrings , FlexibleContexts , FlexibleInstances , TypeFamilies , TypeApplications #-} import Database.Beam import Database.Beam.Postgres import GHC.Generics import Data.Text (Text) data UserT f = User { _userEmail :: Columnar f Text , _userFirstName :: Columnar f Text , _userLastName :: Columnar f

gitlab-CI for a Haskell Stack project: How to cache built libraries?

試著忘記壹切 提交于 2019-12-10 16:06:09
问题 I'm using the following .gitlab-ci.yml file for setting up gitlab-CI for a Haskell Stack project created with stack new actividad3 --resolver=lts-14.6 . image: haskell:8.6.5 cache: paths: - .stack - .stack-work - target test: stage: test script: - ghc --version - stack --system-ghc build - stack test Building and testing the project last almost 5 minutes. Most of the time is spent building the hspec library. Is there any way to cache the used libraries between pipeline runs? Thanks in advance

`stack build` failed with `/usr/bin/ld: final link failed` on Archlinux

十年热恋 提交于 2019-12-10 15:43:48
问题 I'm trying to use the req package (http://hackage.haskell.org/package/req) in a Haskell project, with stack. So far, I've done stack new my-project , stack setup , stack build and stack exec my-project-exe all fine. Have added req to the cabal file like so: name: my-project version: 0.1.0.0 synopsis: Short description of your package homepage: https://github.com/githubuser/#readme license: BSD3 license-file: LICENSE author: Author name here maintainer: example@example.com copyright: 2017

install ghcjs from stack

非 Y 不嫁゛ 提交于 2019-12-10 14:19:25
问题 I have GHC installed through stack ( so that stack ghc -- --version shows GHC-7.10.3 ) $ stack install ghcjs Run from outside a project, using implicit global project config Using resolver: lts-5.2 from implicit global project's config file: /home/john/.stack/global-project/stack.yaml The following target packages were not found: ghcjs Some resources suggest ghcjs is somewhat experimental (though in the further stages). Looking at http://docs.haskellstack.org/en/stable/ghcjs/ I thought maybe