haskell-stack

Adding an extra-deps that doesn't exist yet

左心房为你撑大大i 提交于 2021-02-11 15:53:32
问题 In the process of solving this tricky build situation, I have now encountered a problem with depending on a Cabal package that I generate myself (the full package, package.yaml and Setup.hs and source code and dependant C libraries and all). I have a stack.yaml and a package.yaml which together describe an environment where I can run my code generator, so this works: Set up the environment, make sure all dependencies are available: stack build In this environment, I can now execute a build

stack --nix build complains about ghc version mismatch

做~自己de王妃 提交于 2021-02-08 18:33:59
问题 When building threepenny-gui on NixOS with stack --nix build , I got error saying I have the wrong version of ghc. Then I tried stack --nix setup , which doesn't run because bash is on an unexpected path on NixOS (that's expected, since the stack documentation only mentions stack --nix build not setup ). What am I missing? FYI, to deal with the zlib issues I have also added a shell.nix and default.nix per https://github.com/commercialhaskell/stack/issues/2130 EDIT: was able to build with the

stack --nix build complains about ghc version mismatch

↘锁芯ラ 提交于 2021-02-08 18:30:27
问题 When building threepenny-gui on NixOS with stack --nix build , I got error saying I have the wrong version of ghc. Then I tried stack --nix setup , which doesn't run because bash is on an unexpected path on NixOS (that's expected, since the stack documentation only mentions stack --nix build not setup ). What am I missing? FYI, to deal with the zlib issues I have also added a shell.nix and default.nix per https://github.com/commercialhaskell/stack/issues/2130 EDIT: was able to build with the

stack --nix build complains about ghc version mismatch

时间秒杀一切 提交于 2021-02-08 18:29:55
问题 When building threepenny-gui on NixOS with stack --nix build , I got error saying I have the wrong version of ghc. Then I tried stack --nix setup , which doesn't run because bash is on an unexpected path on NixOS (that's expected, since the stack documentation only mentions stack --nix build not setup ). What am I missing? FYI, to deal with the zlib issues I have also added a shell.nix and default.nix per https://github.com/commercialhaskell/stack/issues/2130 EDIT: was able to build with the

Haskero fails with “Not a valid Unicode code point!”

浪子不回头ぞ 提交于 2021-02-07 21:29:09
问题 I'm trying to run Haskero to do Haskell editing with VSCode. However, it's failing on initialization, with the following error: Initializing Haskero... Spawning process 'stack' with command 'stack ghci --with-ghc intero "--ghci-options=-ignore-dot-ghci -Wall" --no-build --no-load' (node:3726) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: reason.indexOf is not a function (node:3726) DeprecationWarning: Unhandled promise rejections are deprecated.

ghc sanity check error while setup ghc-8.2.1 for haskell stack on Opensuse 42.3

孤街浪徒 提交于 2021-01-28 09:26:33
问题 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 # '

How to integrate dependency into existing project in Haskell?

落爺英雄遲暮 提交于 2021-01-27 18:41:28
问题 I am currently trying to get started with Haskell because I want to use parts of the code base of Pandoc for a different project. Since I am new to Haskell I need proper IDE features like code completion and jump to definition AND type information and documentation on hover . I chose VSCode with the Haskell extension for the job. Now comes my problem: Pandoc depends on pandoc-types which is an integral part of the code, which I need to understand and modify. But using the ghc-option "

Building multiple executables in the default Haskell Stack project

不羁的心 提交于 2021-01-27 05:45:00
问题 I used the default stack new to setup a project that has a server and a client as separate executables. I altered the package.yaml file in what seems like the right way (As of April 21, 2020 "There is no user guide") and added a new file to my app directory called Client.hs . I got an error saying "Enabling workaround for Main module 'Main' listed in 'other-modules' illegally!" How do I have stack build both the client and the server? When I ran stack build I got: [... clip ...] Building

What is the suggested way of setting up Haskell on Archlinux?

眉间皱痕 提交于 2021-01-24 10:46:28
问题 Long story short, I'd like some guidance on what's the (best) way to have Haskell work on Archlinux. By work I mean all, in terms of the ghci command line tool, installing packages I don't have - such as vector-space, which this answer to a question of mine refers to -, and any other thing that could be necessary to a Haskell ostinate learner. Archlinux wikipage on Haskell lists three (alternative?) packages for making Haskell work on the system, namely ghc , cabal-install , and stack . I

Haskell stack installs package, but module can't be imported

北慕城南 提交于 2021-01-07 02:42:06
问题 I seem to be able to install a package using stack, but then it's not available in ghci. I didn't set up a project directory; I'm just loading files from the directory I start ghci in. (I'll get to packages, this is for my early learning experiments.) With stack Version 2.5.1, Git revision d6ab861544918185236cf826cb2028abb266d6d5 x86_64 hpack-0.33.0, I am able to install package pretty-tree : ~$ stack install pretty-tree split > using precompiled package boxes > using precompiled package