haskell-stack

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

一曲冷凌霜 提交于 2021-01-07 02:41:14
问题 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

Generating documentation for my own code with Haddock and stack

别来无恙 提交于 2020-12-29 02:36:39
问题 I have annotated my code in Haddock style and would like to generate browse-able documentation. Since I am also using stack, I want to integrate the documentation generation into the workflow. However, I have not yet been able to generate anything useful. I can run stack haddock and it will generate documentation in the style I want (to be found deep inside ~/.stack/ ), but it only seems to generate documentation for the packages I depend on, rather than for my own code. When I run stack

How to pre-install stack dependencies, to reduce stack build time?

余生长醉 提交于 2020-05-16 05:19:40
问题 I'm building a docker image from a Haskell application, I'm executing stack build from within the container. Because stack build is starting from a 'fresh/vanilla' docker image - all the libraries need to be installed/pulled. Is there a way I can pre-install these library dependencies? For the end goal of reducing the docker image build time ( stack build ). I'd also like to be able to later on 'add' an additional dependency without having to once again stack build everything over from start.

How to pre-install stack dependencies, to reduce stack build time?

对着背影说爱祢 提交于 2020-05-16 05:15:47
问题 I'm building a docker image from a Haskell application, I'm executing stack build from within the container. Because stack build is starting from a 'fresh/vanilla' docker image - all the libraries need to be installed/pulled. Is there a way I can pre-install these library dependencies? For the end goal of reducing the docker image build time ( stack build ). I'd also like to be able to later on 'add' an additional dependency without having to once again stack build everything over from start.

How do I use the output of a program from an earlier part of a Stack/Cabal build as source in a later part of the same build?

五迷三道 提交于 2020-05-14 16:44:25
问题 I have a very peculiar dependency situation that I would like to package up in a single Stack/Cabal package: I need to build and run my program to get the input to a code-generator which produces output that needs to be linked in to... my program. OK so in more concrete terms, here are the steps manually: stack build to install all dependencies, and build all non-Verilator-using executables. stack exec phase1 to run the first phase which generates, among other things, a Verilog file and a

How do I use the output of a program from an earlier part of a Stack/Cabal build as source in a later part of the same build?

橙三吉。 提交于 2020-05-14 16:43:05
问题 I have a very peculiar dependency situation that I would like to package up in a single Stack/Cabal package: I need to build and run my program to get the input to a code-generator which produces output that needs to be linked in to... my program. OK so in more concrete terms, here are the steps manually: stack build to install all dependencies, and build all non-Verilator-using executables. stack exec phase1 to run the first phase which generates, among other things, a Verilog file and a

Stack can't find a downloaded module (Data.MultiSet)

不羁的心 提交于 2020-05-09 08:01:17
问题 I've been using stack (in my linux computer) to compile my haskell code and today I installed for the first time an external module. I installed Data.MultiSet by running the following command: sudo stack install multiset Supposedly the module was succesfully installed but I can't load it, stack throws the following message when I try to compile my code: ..error: Could not find module ‘Data.MultiSet’... I checked the files contained in my .stack directory and there are many files with the name