haskell-stack

Cabal 2.0 required when using a nightly snapshot with stack

拜拜、爱过 提交于 2020-01-03 12:28:10
问题 I'm trying to setup a new project using the nightly-2017-08-17 snapshot stack new test --resolver nightly-2017-08-17 However this gives the following error: Downloading template "new-template" to create project "test" in test/ ... Looking for .cabal or package.yaml files to use to init the project. Using cabal packages: - test/test.cabal Selected resolver: nightly-2017-08-17 Unable to parse cabal file: FromString "This package requires at least Cabal version 2.0" Nothing Cabal is in its

Recommended approach to use Stack as global package manager

最后都变了- 提交于 2020-01-02 02:15:08
问题 I would like to install some Haskell libraries globally, for example hindent which is used by my editor's Haskell integration. What is the recommended way to do this? I thought that stack install hindent was the correct way to do this. However, then I wanted to update my packages and found that there was no way to do this . According to the GitHub issue report I found, stack is concerned with managing a local build sandbox for a project. It isn't intended to be a global package manager. There

Load a new package in ghci using stack

Deadly 提交于 2020-01-01 08:47:29
问题 Is there a way to load a package(s) using Stack in GHCI and play around with it ? So, that when the ghci is loaded, we can import the modules and see it's type signature, etc. 回答1: For the packages present in Stackage, $ stack ghci --package unix-time And this will give you a repl with the package unix-time loaded in it: Run from outside a project, using implicit global project config Using resolver: lts-6.14 from implicit global project's config file: /home/sibi/.stack/global-project/stack

Load a new package in ghci using stack

会有一股神秘感。 提交于 2020-01-01 08:47:03
问题 Is there a way to load a package(s) using Stack in GHCI and play around with it ? So, that when the ghci is loaded, we can import the modules and see it's type signature, etc. 回答1: For the packages present in Stackage, $ stack ghci --package unix-time And this will give you a repl with the package unix-time loaded in it: Run from outside a project, using implicit global project config Using resolver: lts-6.14 from implicit global project's config file: /home/sibi/.stack/global-project/stack

Stack's package.yaml vs stack.yaml

五迷三道 提交于 2020-01-01 08:42:51
问题 Stack has supported hpack's package.yaml configuration files since at least around this commit, as far as I can tell, but there's not much documentation about the differences between it and the stack.yaml file. One of the few links I've found talking about it is this documentation, where it says: package.yaml is a file format supported by hpack. It adds some niceties on top of cabal. For example, hpack has YAML syntax support and will automatically generate of exposed-modules lists. However,

Stack's package.yaml vs stack.yaml

我与影子孤独终老i 提交于 2020-01-01 08:41:17
问题 Stack has supported hpack's package.yaml configuration files since at least around this commit, as far as I can tell, but there's not much documentation about the differences between it and the stack.yaml file. One of the few links I've found talking about it is this documentation, where it says: package.yaml is a file format supported by hpack. It adds some niceties on top of cabal. For example, hpack has YAML syntax support and will automatically generate of exposed-modules lists. However,

Why is `stack build` altering my .cabal file?

ぐ巨炮叔叔 提交于 2019-12-31 02:20:25
问题 I am attempting to build a project which uses Euterpea. Running stack build I get the following error, suggesting that I need to add Euterpea to the build-depends section of my .cabal file. $ sb composition-0.1.0.0: build (lib + exe) Preprocessing library composition-0.1.0.0... [2 of 2] Compiling Lib ( src/Lib.hs, .stack-work/dist/x86_64-linux-nix/Cabal-1.24.2.0/build/Lib.o ) /home/matthew/backup/composition/composition/src/Lib.hs:5:1: error: Failed to load interface for ‘Euterpea’ It is a

Why is `stack build` altering my .cabal file?

风流意气都作罢 提交于 2019-12-31 02:19:06
问题 I am attempting to build a project which uses Euterpea. Running stack build I get the following error, suggesting that I need to add Euterpea to the build-depends section of my .cabal file. $ sb composition-0.1.0.0: build (lib + exe) Preprocessing library composition-0.1.0.0... [2 of 2] Compiling Lib ( src/Lib.hs, .stack-work/dist/x86_64-linux-nix/Cabal-1.24.2.0/build/Lib.o ) /home/matthew/backup/composition/composition/src/Lib.hs:5:1: error: Failed to load interface for ‘Euterpea’ It is a

Can docker solve a problem of mismatched C shared libraries?

前提是你 提交于 2019-12-24 11:28:15
问题 I am trying to run some haskell code on an ubuntu (18.04) host, which was compiled on my laptop. host: 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux laptop: 4.14.74-1-MANJARO #1 SMP PREEMPT Fri Oct 5 14:16:52 UTC 2018 x86_64 GNU/Linux The error I get is /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found After doing some research I learned that this is because my laptop has version 2.28 of glibc installed, but the host only has libc6

undefined reference to symbol 'pthread_setname_np@@GLIBC_2.12' Haskell Stack error on OpenSuse42.3

混江龙づ霸主 提交于 2019-12-24 09:57:26
问题 I have installed haskell stack and I'm trying to setup ghc for the same. stack version is stack --version Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1 I have updated the ~/.stack/global-project/stack.yaml as below # This is the implicit global project's config file, which is only used when # 'stack' is run outside of a real project. Settings here do _not_ act as # defaults for all projects. To change stack's default settings, edit # '