cabal

Why are cabal reinstalls “always dangerous”?

懵懂的女人 提交于 2019-12-06 16:51:15
问题 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? 回答1: 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

Portable package installation on Haskell Platform with Cabal on windows

六月ゝ 毕业季﹏ 提交于 2019-12-06 12:27:34
I have Windows XP and Haskell Platform 2013 installed on it. When I want to compile my code on some computer, which has not Haskell Platform installed on it, and I'm not allowed to install anything, I can copy my Haskell Platform on USB flashcard, and run on this computer, and it's work just fine. But sometimes I need additional packages, that are not part of the standard Haskell Platform build. I can simply install it on my personal computer with Cabal, but I don't know, how to install them in such a way that they could work portable, i. e. from my USB flashcard on not my computer. I tried

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

孤者浪人 提交于 2019-12-06 07:35:31
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 for each resolver. Is this the case? Is there a better way? How do I match the right Cabal spec with

Retrieving names of modules included in a cabal package from parsing the .cabal file

倾然丶 夕夏残阳落幕 提交于 2019-12-06 03:28:05
问题 I wonder if there is a way to retrieve the module names of a cabal package from parsing the .cabal files. I have tried to use parsePackageDescription from Distribution.PackageDescription.Parse but for instance when I try parsing the .cabal of the Cabal package itself (http://hackage.haskell.org/package/Cabal-1.18.1.2/Cabal.cabal) the library value of PackageDescription is Nothing even though there is a library section with both exposed-modules and other.modules in the .cabal file. Is this

Haskell Cabal: Mysterious missing or recursive dependencies

*爱你&永不变心* 提交于 2019-12-06 03:09:26
问题 I try to install the jmacro package. It builds perfectly, and there are absolutely no issues. However, when I want to use it or install packages like happstack-jmacro , which depend on jmacro, I get error messages like this: <command line>: cannot satisfy -package-id jmacro-0.5.2-71bd40707d94b0e8eb6e70515ff6a5f4: jmacro-0.5.2-71bd40707d94b0e8eb6e70515ff6a5f4 is unusable due to missing or recursive dependencies: haskell-src-meta-0.5-4bf46b12fb313927e18a04de209944de template-haskell-2.5.0.0

cabal sandbox install still fails with “packages are likely to be broken by the reinstalls”

筅森魡賤 提交于 2019-12-06 02:19:26
问题 I'm trying to build the Elm Platform using a cabal sandbox. The installation fails however with the message "packages are likely to be broken by the reinstalls". This seems to me to contradict the whole purpose of sandboxing, which I had believed was supposed to avoid this kind of error. Can anybody explain this error for me, and even better help me proceed with the Elm install? Is it safe to add --force-reinstalls ? Here are the sequence of commands I executed: cabal sandbox init cabal

How should I go about testing a monolithic executable package?

让人想犯罪 __ 提交于 2019-12-06 00:50:51
I have a monolithic executable package with several modules. (What I mean by "monolithic" is that it only has one clause in its cabal file, and that is executable .) It is currently tested with shell scripts, in a black box manner. I thought I would like to write unit tests for some individual functions, but cabal does not agree: % cabal new-test cabal: Cannot test the package x-0.0.0.0 because none of the components are available to build: the test suite 'x-test' is not available because the solver did not find a plan that included the test suites Here are the relevant sections of package

stack.yaml file & .cabal file differences?

僤鯓⒐⒋嵵緔 提交于 2019-12-05 21:54:30
问题 I have recently started using stack for Haskell, when specifying external dependencies for your project. Sometimes you place it in the .cabal file while other times you place it in the .yaml file. Am I right in thinking that when you put it in the cabal file it only looks in the stackage repository for your packages. However when you place it in your .yaml file it also searches in the Hackage server, if it cannot find it in any of the snapshots? 回答1: All of the dependencies for your project

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

Trouble Installing HTF with Cabal

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 17:53:52
I am trying to install HTF. However after I cabal install HTF I get this: Resolving dependencies... Configuring HTF-0.10.0.7... Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. package regex-base-0.93.2 requires mtl-2.0.1.0 package aeson-0.6.0.2 requires mtl-2.1.2 package HTF-0.10.0.7 requires mtl-2.1.2 package mtl-2.0.1.0 requires transformers-0.2.2.0 package transformers-base-0.4.1 requires transformers-0.3.0.0 package mtl-2.1.2 requires transformers-0.3.0.0 package monad-control-0.3.1.4 requires transformers