cabal-install

How can I pin a version of a Haskell dependency to a version of an underlying native dependency with Cabal?

旧巷老猫 提交于 2019-12-05 19:32:04
In my particuar case, I have a dependency in my Cabal file on the Haskell package bindings-libzip . In particular, I could accept several different versions of libzip , e.g. bindings-libzip-0.11 or bindings-libzip-0.10 . These in turn have a dependency on the respective native C libzip libraries versions 0.11 and 0.10 . Therefore I have bindings-libzip >= 0.10 < 0.12 in my .cabal file. The Haskell package bindings-libzip-x specifies with PkgConfig-Depends that libzip version x must be present on a client machine. Let's say a downstream user has version 0.10 of libzip installed. However, when

cabal can't use http proxy

早过忘川 提交于 2019-12-05 09:59:01
My Linux(redhat6) server has to use http proxy to connect to outside world. While it works for other things like wget, it doesn't work for cabal. cabal update -v3 shows errors like this: 407 - proxy authentication required cabal: Failed to download http://hackage.haskell.org/packages/archive/00-index.tar.gz : ErrorMisc "Unsucessful HTTP code: 407" I tried to change http_proxy environment variable to format like http:// user: passwd at proxy:port, but it doesn't work either. The same problem has been asked here But I'm not allowed use a proxy server like polipo, is there any other way to make

mysterious cabal-install problems

ⅰ亾dé卋堺 提交于 2019-12-05 02:01:41
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-1.0.0.2 every time. Looks like random depends on time , and cabal wants to reinstall it after there's

How do I install dependencies when cross compiling haskell code?

こ雲淡風輕ζ 提交于 2019-12-05 00:51:36
I've successfully created a ghc cross compiler, that allows me to compile haskell code for armv6h (raspberry pi in my case) from my x64 linux machine. I've successfully run a hello world program on the raspberry. No I want to build my real app, which has a lot of dependencies on other haskell modules. When I compile for x64 I simply do cabal install dependenciy1 depenency2 ... I know I could make my own programm a cabal-project an automate this step. But that's not the point here. When I try to use the cross-compiler arm-unknown-linux-gnueabi-ghc --make myapp.hs It tells me about modules it

Why are cabal reinstalls “always dangerous”?

不羁的心 提交于 2019-12-04 23:59:29
When reinstalling a package using Cabal, one usually sees this warning: Warning: Note that reinstalls are always dangerous. Continuing anyway... What are some of the reasons behind this message? Currently, reinstalling a package means destructively overwriting an already installed package. If that old package has any reverse dependencies on the system, they'll no longer work. To make this less likely, cabal-install checks the package databases it has access to when invoked for such reverse dependencies and lists them. In this situation, it requires --force-reinstalls to continue. But even if

Cabal install needs C library: Windows

人盡茶涼 提交于 2019-12-04 19:56:37
问题 I am trying to cabal install yesod on my Windows machine. I have a relatively fresh install of the Haskell Platform. The cabal install failed, reporting that I need the sqlite3 C library in order to install "persistent", a package which Yesod relies upon. cabal: Missing dependency on a foreign library: * Missing C library: sqlite3 So I went to http://www.sqlite.org/download.html and grabbed both the C source and the precompiled binary. I tried using both, to no avail: cabal install persistent

Cabal fails updating of cabal-install

北城余情 提交于 2019-12-04 12:43:27
Every time I install a library, cabal tells me to install a new version of cabal-install. Despite the fact that i run (with apparent success) the procedure that list below, the version of cabal-install remains unchanged. Where I am going wrong? (My OS is Window 7 64-bits) My User PATH is C:\Users\Alberto\AppData\Roaming\cabal\bin System variables: CABAL_DIR = C:\Users\Alberto\AppData\Roaming\cabal BEFORE the update C:\Users\Alberto>cabal -V cabal-install version 1.16.0.2 using version 1.16.0 of the Cabal library C:\Users\Alberto>cabal update Downloading the latest package list from hackage

Install Haskell packages using cabal without internet connection

孤街浪徒 提交于 2019-12-04 08:32:18
I have a machine that doesn't have internet access at all. I installed the Haskell Platform on it using the installer which I got from another machine through a pendrive. Now I want to install the package repa on my home machine which has no internet access. How should I do that? My home machine is running Linux (Debian) and my office machine is Windows 7. From a machine you can access the internet you can either: Run cabal get pkg-name where pkg-name is the package you want. Go to the package's page on Hackage and on the Downloads section there's a .tar.gz file you can download. After you get

How can I tell Cabal which dependency to use?

橙三吉。 提交于 2019-12-04 06:56:46
I'm trying to get Cabal to install the haskell-src-meta package, and I'm having difficulty with the template-haskell dependency. The dependencies for haskell-src-meta include both template-haskell >=2.7 && <2.9, template-haskell >=2.4 && <2.7, It so happens that template-haskell versions 2.7 and later will not install on my system, but template-haskell 2.5.0.0 will install. When I'm asking Cabal to install haskell-src-meta , how do I tell it to use template-haskell == 2.5.0.0 ? Here is the full information for cabal info haskell-src-meta on my system: * haskell-src-meta (library) Synopsis:

When I try to install hlint I get errors surrounding old-time-1.1.0.3

百般思念 提交于 2019-12-04 04:03:47
I first tried to install Hlint. cabal install hlint but then I got the error: cabal: Error: some packages failed to install: cpphs-1.20.2 depends on old-time-1.1.0.3 which failed to install. haskell-src-exts-1.18.2 depends on old-time-1.1.0.3 which failed to install. hlint-1.9.37 depends on old-time-1.1.0.3 which failed to install. old-time-1.1.0.3 failed during the configure step. The exception was: ExitFailure 77 Then I tried to install ghc-mod since I read that hlint is a dependency of that package(?). Thinking that it might resolve the problem. So i did cabal install ghc-mod which gave me