haskell-stack

Haskell, stack: locate the executable

筅森魡賤 提交于 2019-12-05 22:44:05
I'm looking for something like $ stack whereis hasktags where whereis acts more or less like UNIX whereis command. hasktags is to be run like this: $ stack exec -- hasktags stack exec -- whereis hasktags will do. stack exec -- whereis yourprogramname works for me on a Linux box, but I have to use stack exec -- which yourprogramname on Mac OS X. ( which also works on Linux, of course.) Note that neither of these are useful for automating deployments when the executable name is the same as one on the build machine -- not likely, but not impossible. 来源: https://stackoverflow.com/questions

How to exclude dependencies when building haddocks?

雨燕双飞 提交于 2019-12-05 18:02:26
Is there any way to build haddock docs for specific packages? I'm trying to build haddocks for my package/app alone, but the following command seems to be doing this for all dependencies, as well: stack haddock webservice (where webservice is the name of my package/app) The flag you're looking for is --no-haddock-deps as in stack haddock --no-haddock-deps webservice 来源: https://stackoverflow.com/questions/50175379/how-to-exclude-dependencies-when-building-haddocks

Haskell-Stack: Access violation error during build

此生再无相见时 提交于 2019-12-05 05:12:56
I've been trying to build my Haskell project for the last couple days using stack and I'm getting an access violation error. From what I understand I have the latest stack version and GHC. This was all originally working until I added a library to my cabal file. I've now removed it but the error still occurs. I've also reverted back to when my code was definitely working so I'm sure this is something caused by stack. I've tried uninstalling stack, deleting .stack-work and reinstalling. Then doing a stack setup. I've tried many variations of commands but no results. I've now also tried creating

Recommended approach to use Stack as global package manager

半城伤御伤魂 提交于 2019-12-05 04:06:13
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 appear to be workarounds such as maintaining a dummy project with artificial dependencies on the

Select which test to run with Hspec and stack

那年仲夏 提交于 2019-12-04 18:26:12
问题 I've written a series of test, using the automatic spec discovery feature of Hspec. I'm also using stack as my build tool. My test directory has the the Spec.hs file, along with the test files for the different modules of my application (e.g. Module0Spec.hs , Module1Spec.hs ). Now, when I start writing a new test module, or when I want to re-run a failed test after code changes, I'd like to be able to run only a given test module. Is there any way in which either stack or Hspec allow to do

How do I add the “containers” package to my .cabal file (without getting overwritten by stack at compile time)?

痞子三分冷 提交于 2019-12-04 18:14:48
问题 I am working on the "roman-numerals" task from the exercism Haskell track and followed their instructions to installing stack. I am working on a Fedora 24 box. As long as I was working with Haskell modules from base, I didn't have a problem. Now I am trying to import the Data.Map module. It works fine using the ghci command line: $ ghci GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done.

Where can I find correct package name and version for Haskell?

我只是一个虾纸丫 提交于 2019-12-04 14:02:33
Say, I need System.Eval.Haskell . Or whatever else. How do I know which package I should specify in my package.yaml ? When I go to the https://hackage.haskell.org/package/plugins-1.5.7/docs/System-Eval-Haskell.html , I see no package name. P.S. "plugins" did not work for me. Thus, I assume it's something different. I hope so :) Looks like there is somewhat quite unclear difference between extra-dependencies and "regular" dependencies in the configuration. Mentioning plugins-1.5.7 as extra-dep indeed works. Am I doing some dependency mismanagement here, or that's green way to go? Looks like

Haskell: Missing C library on Arch Linux works on Ubuntu

狂风中的少年 提交于 2019-12-04 11:24:27
I recently switched my PC at work from Ubuntu to Arch Linux . And I am now getting the following error (I am using stack to build my project): setup-Simple-Cabal-1.22.4.0-ghc-7.10.2: Missing dependency on a foreign library: * Missing C library: HSrts-ghc7.10.2 This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. As far as I understand it, the difference in

How do I install Haskell Stack locally?

让人想犯罪 __ 提交于 2019-12-04 08:48:05
I am working on my school server and I need to install Haskell's stack. In the README file and on the website I could not find how to install locally. What can I do if I am not a sudo user? You don't need superuser privileges to install stack; you can as well install it in your own home directory. All you need for this to work is a Linux system with GMP installed (which GHC depends on at a very fundamental level). If GMP is not installed – the admins really shouldn't have any concerns installing that. #!/bin/bash # Stack installation script, adapted from: # https://github.com/yantonov/install

What's the difference between `stack install NAME` and `NAME` in the build-depends of project.cabal file?

南楼画角 提交于 2019-12-04 03:48:18
问题 What is the difference between adding package_name under the build-depends: section in a project's .cabal file , versus doing stack install package_name within that project's directory? 回答1: stack install will just install the package to the appropriate place (the current snapshot database for libraries in Stackage, the sandbox in ./.stack-work for other libraries, ~/.local/bin or your system's equivalent thereof for executables). Adding a library to build-depends specifies it as a dependency