cabal

How can one register a package built with cabal-dev?

孤者浪人 提交于 2019-12-10 15:14:59
问题 I was able to use cabal-dev to build some packages that cabal was having issues with. ( help with cabal install package shadowing errors ). How does one then install and use them? I tried copying the package database files into the ~/.ghc/x86_64-linux-7.0.4/package.conf.d folder, and running ghc-pkg recache --user , but no luck. (They do show up in ghc-pkg now though). 回答1: This seems to work, though it's more crap I have to put in my zshrc... export GHC_PACKAGE_PATH=$HOME/cabal-dev/packages

Depend on test from bench

ぐ巨炮叔叔 提交于 2019-12-10 14:57:19
问题 I have a test project test-suite spec ... benchmark bench build-depends: library-test-spec ... how do I depend on the test-suite code from benchmark? The above doesn't work, because the package with name library-test-spec doesn't exist. 回答1: From Cabal 2.0 onwards, you can put the common code in a named "internal library" on which both the test suite and the benchmark can depend. According to the documentation: Cabal 2.0 and later support “internal libraries”, which are extra named libraries

How can I stream test results with cabal new-test?

我的未来我决定 提交于 2019-12-10 14:43:28
问题 Using cabal test , you're able to stream results with cabal test --show-details=streaming . I can't find a comparable option for cabal new-test . Is it possible to stream results using new-test ? 回答1: I just ran into this an hour ago myself! The --show-details flag is not yet supported by new-test : https://github.com/haskell/cabal/issues/4766 The discussion in the bug report indicate that maybe --show-details was a misfeature anyways, and it should always just stream. 来源: https:/

What to do if libraries require a different version of `base`?

二次信任 提交于 2019-12-10 14:11:58
问题 I'm trying to install packages which require a different version of base than the one I have installed (I have 4.6.0.0 , they require < 4.6 ). How can I install these on my system? Edit: These packages actually require older packages in order to build, not just as a .cabal constraint. 回答1: Since you can't reinstall base , the only way to get these packages installed before they are updated is to grab the source, cabal unpack foo and then edit foo.cabal , changing the upper bound for base

Installing packages (via cabal) from “local hackage”

馋奶兔 提交于 2019-12-10 14:04:44
问题 Is it possible to get cabal to Download a particular package source, including all dependency packages sources. At a later stage (when internet connectivity can no longer be relied upon) install these packages via cabal, from the locally downloaded files, automatically in the right order so that the desired package is build? I know that you can use cabal unpack to view the source of a particular package, but I am not sure how to achieve above. Also note that in this post Can't get cabal

How safe is it to update base?

霸气de小男生 提交于 2019-12-10 12:45:40
问题 On ubuntu I currently have haskell-platform 2011.2.0.1.2 installed, and I am currently working on some code where it would be very nice to have Control.Concurrent.Chan be an instance of Eq . Unfortunately, in base-4.3.1.0 , which is the one I have installed, it is not, but in base-4.4.0.0 Chan is an instance of Eq . Would it be possible to update base, maybe by sandboxing it with cabal-dev or any other method, in a way that would not break too many packages? 回答1: No, you should never upgrade

How can configuration tools like sdl-config be used with a cabalized project?

人走茶凉 提交于 2019-12-10 12:44:52
问题 I have a working SDL/Haskell application that I would like to build using Cabal instead of the current Makefile (because that is the "Haskell way"). The Makefile is itself very simple, and I was hoping that the default cabal build process could allow me to reconstruct a build command specified in my Makefile. The problem is that it makes use of "sdl-config", a utility that gives you all the necessary cc- compiler options: wrapper.o: SDLWrapper_stub.h ghc -no-hs-main `sdl-config --cflags`

How do I match the right Cabal spec with each resolver in my Travis CI builds?

亡梦爱人 提交于 2019-12-10 10:51:05
问题 After updating my Haskell package's .cabal file to Cabal 2.2, most of my Travis CI builds with resolvers older than LTS 12.9 fail with: This package description follows version 2.2 of the Cabal specification. This tool only supports up to version XX.XX.XX. where the version varies depending on the resolver specified in my .travis.yaml. It seems that for each resolver I need to specify a different Cabal version In fact, because of Cabal spec changes, I appear to need a different .cabal file

Haskell how to resolve cabal error: Missing dependencies on foreign libraries?

◇◆丶佛笑我妖孽 提交于 2019-12-10 03:59:35
问题 While trying to cabal install gd I encountered the following error Configuring gd-3000.7.3... cabal: Missing dependencies on foreign libraries: * Missing (or bad) header file: gd.h * Missing C libraries: gd, png, jpeg This problem can usually be solved by installing the system packages that provide these libraries (you may need the "-dev" versions). ... It says Missing C libraries: gd, png, jpeg I guess I am right if I interpret it as: the missing libraries are some unspecified version of:

mysterious cabal-install problems

℡╲_俬逩灬. 提交于 2019-12-10 03:17:16
问题 With a clean install of the "Haskell Platform". (OS X Snow-Leopard & Platform 2010.1.0.1), doing this causes simple sequence causes very weird cabal install behaviour: $ cabal install time $ cabal install random $ ghc-pkg list random /Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.1/package.conf.d random-1.0.0.2 /Users/yairc/.ghc/i386-darwin-6.12.1/package.conf.d random-1.0.0.2 random-1.0.0.2 is installed twice in my system. and now doing cabal install random reinstalls random