cabal

C compiler selection in cabal package

浪子不回头ぞ 提交于 2019-12-04 00:13:19
I decided to add some flags to control the way that C source file is compiled (i.e. something like use-clang, use-intel etc.). C-Sources: c_lib/tiger.c Include-Dirs: c_lib Install-Includes: tiger.h if flag(debug) GHC-Options: -debug -Wall -fno-warn-orphans CPP-Options: -DDEBUG CC-Options: -DDEBUG -g else GHC-Options: -Wall -fno-warn-orphans Question is: which options in descritpion file need to be modified to change C compiler? I did found only CC-Options. There really doesn't seem to be any way to specify this in a .cabal file; the only thing we seem to have at the moment that would be even

How to completly remove packages installed by cabal?

南笙酒味 提交于 2019-12-04 00:09:24
问题 I am trying to learn cabal, and have tested several my own little projects, now I want to clean them up. Basically, if I am working without a sandbox , my workflow is: run cabal init edit src/Mylib.hs , and then edit mylibname.cabal file run cabal build run cabal repl and test my code run cabal install Now, I see my own project: installed into ~/.cabal/lib/x86-64-linux-ghc-7.10.1 registered in ~/.ghc/package.conf.d I can write import Mylib in my other haskell source code, so I think the

How to set ghci options for cabal repl?

我是研究僧i 提交于 2019-12-03 23:43:40
I have a haskell project which I compile with -Werror by default. This means that when I run cabal repl it runs with the option -Werror turned on. This means that for example when I evaluate 2 + 2 I get the following error message: <interactive>:2:3: Warning: Defaulting the following constraint(s) to type `Integer' (Num a0) arising from a use of `+' In the expression: 2 + 2 In an equation for `it': it = 2 + 2 So I need a way to turn on the option, -w or maybe -Wwarn on by default for cabal repl . How do I do this? Also what are the default flags for ghci ? You can set GHCi options in your ~/

How to upgrade gtk2hsC2hs?

会有一股神秘感。 提交于 2019-12-03 23:04:19
I am trying cabal install glib-0.12.3 under my Ubuntu 11.10 using cabal-install 0.10.2. However, it shows the following error messages: setup: The program gtk2hsC2hs version >=0.13.5 is required but the version found at /usr/bin/gtk2hsC2hs is version 0.13.4 cabal: Error: some packages failed to install: glib-0.12.3 failed during the configure step. The exception was: ExitFailure 1 After half an hour's search, I cannot find where this gtk2hsC2hs is. I dug into places like http://code.haskell.org/gtk2hs/tools/c2hs/ , but could not seem to find the right version. How could I upgrade my gtk2hsC2hs

Blacklisting your own faulty hackage release

假如想象 提交于 2019-12-03 22:53:27
I've accidentally uploaded a faulty distribution and tried to reupload it right away, but cabal replied with: This version of the package has already been uploaded. As a matter of policy we do not allow package tarballs to be changed after a release (so we can guarantee stable md5sums etc). The usual recommendation is to upload a new version, and if necessary blacklist the existing one. In extraordinary circumstances, contact the administrators. Okay, I've incremented the version and uploaded the correct distro, but now I am interested in blacklisting the faulty release, as suggested. However

How to configure cabal in Windows 7?

久未见 提交于 2019-12-03 17:41:57
问题 I have installed Haskell Platform 2012 in Windows 7. I write in the console cabal update and I take a message that there is a new version of cabal. I write cabal install cabal-install . After installation finishes it tells me that the cabal has been installed in C:\username\AppData\Roaming\cabal. So when I do cabal update again I am taking the same message that I have to install the new version of cabal. I have tried to change the cabal directory from the config file but cabal ignores the

Resolving GHC 'I found a duplicate definition for symbol …'

孤者浪人 提交于 2019-12-03 16:26:53
问题 When running Haskell programs that import several packages like this one: import Text.Feed.Import import Network.HTTP main = do page <- simpleHTTP (getRequest "http://stackoverflow.com") print $ page I get an error like this one ( Note: This question intends to solve the general problem, this specific case is just an example) : GHCi runtime linker: fatal error: I found a duplicate definition for symbol get_current_timezone_seconds whilst processing object file /usr/lib/ghc/time-1.4.0.1/HStime

how can I build cabal-install on eeePc 701 / Ubuntu Netbook Remix 1.6 (Lucid)

邮差的信 提交于 2019-12-03 16:02:42
Not a programming question, but the first time I see something like this. UNR 1.6 (based on Ubuntu 10.04) installs the 6.12.1 version of GHC. So, in order to build cabal-install-0.8.2, I have to install the libghc6- packages of parsec, mtl, network and zlib. Then, after launching 'sh ./bootstrap.sh', I get: Checking installed packages for ghc-6.12.1... parsec is already installed and the version is ok. network is already installed and the version is ok. Cabal is already installed and the version is ok. mtl is already installed and the version is ok. HTTP is already installed and the version is

Is there a way to use Cabal to keep Haskell packages up-to-date?

会有一股神秘感。 提交于 2019-12-03 14:42:55
I'm confused by how Cabal works. I'm used to packages managers that have as part of their core functionality the ability to easily update all packages that have changed, or at least to get a list of packages on my system that have updates available. But Cabal seems to lack this functionality. Am I missing something? Is there a way to: Automatically or easily update all out-of-date packages; or, failing that, Get a list of packages installed on my system that have updates available? There are a number of standard package-management features missing from cabal. This is one of them, and