cabal

Trying out “cabal sandbox init” and cabal not recognizing the command “sandbox”

北城余情 提交于 2019-12-23 06:52:07
问题 I'm trying out the tutorial about making a simple website with scotty but I get an error when I try the command "cabal sandbox init": cabal: unrecognised command: sandbox (try --help) Does anyone know what is wrong? 回答1: Is your Cabal/cabal-install version new enough? Sandboxes were introduced in Cabal 1.18. You can check the version with command cabal --version . You might be able to upgrade with these commands: cabal update cabal install Cabal cabal-install 来源: https://stackoverflow.com

Cabal install gtk failing

China☆狼群 提交于 2019-12-23 06:48:56
问题 I'm trying to install gtk via cabal, however, I'm getting the following type errors when building it [ 22 of 209] Compiling Graphics.UI.Gtk.Embedding.Plug ( dist/build/Graphics/UI/Gtk/Embedding/Plug.hs, dist/build/Graphics/UI/Gtk/Embedding/Plug.o ) Graphics/UI/Gtk/Embedding/Plug.chs:120:6: error: Couldn't match expected type ‘Ptr ()’ with actual type ‘Maybe DrawWindow’ In the first argument of ‘gtk_plug_new’, namely ‘(fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’ In the second

Portable package installation on Haskell Platform with Cabal on windows

霸气de小男生 提交于 2019-12-22 18:26:41
问题 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

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

若如初见. 提交于 2019-12-22 10:31:25
问题 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

Trouble Installing HTF with Cabal

守給你的承諾、 提交于 2019-12-22 09:27:54
问题 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

Multiple Haskell cabal-packages in one directory

别来无恙 提交于 2019-12-22 08:51:34
问题 What is the recommended way of having several cabal packages in one directory? Why : I have an old project with many separable modules. Since originally they formed just one program it was, and still is, handy to have them in same directory for easy compiling. Options Just suffer and split everything, including VCS holding the stuff, into different directories? Hack cabal until it is happy with multiple .cabal files in same directory? Make another subdirectory for each module and put .cabal

ghc-pkg check haddock warnings

北慕城南 提交于 2019-12-22 04:58:12
问题 Upon a fresh install of the haskell-platform (via homebrew ) ( GHC x64 7.6.3 ) on OSX 10.9.2 I receive the following warnings when I run ghc-pkg check (see below) Warning: haddock-interfaces: /Users/user/.cabal/share/doc/x86_64-osx-ghc-7.6.3/ghc-mod-3.1.7/html/ghc-mod.haddock doesn't exist or isn't a file Warning: haddock-html: /Users/user/.cabal/share/doc/x86_64-osx-ghc-7.6.3/ghc-mod-3.1.7/html doesn't exist or isn't a directory Warning: haddock-interfaces: /Users/user/.cabal/share/doc/x86

Cabal configure in a sandbox complains “At least the following dependencies are missing” on installed packages

回眸只為那壹抹淺笑 提交于 2019-12-22 04:03:07
问题 I have a project, it's inside a sandbox, I introduced a test-suite in my cabal file and it build-depends on hunit ==1.2.* . The problem is when I try to configure: $ cabal configure --enable-tests Resolving dependencies... Configuring MyProject-0.1.0.0... cabal: At least the following dependencies are missing: hunit ==1.2.* A few more attempts to get it to come around: $ cabal install --dependencies-only Resolving dependencies... All the requested packages are already installed: Use -

Build fails because of “multiple definition” linker errors in native dependencies

…衆ロ難τιáo~ 提交于 2019-12-22 03:49:25
问题 I maintain an open-source framework that uses CircleCI for continuous integration. I've recently hit a wall where the project suddenly refused to build in rather strange circumstances. Build 27 was the last one that succeeded. After that, I made some minor changes to dependencies and noticed that the build fails. I've tried to fix it without success, so I reverted back to last working configuration and it still failed. The reason for failure are two dependencies, both being bindings to native

Haskell Cabal: “package indirectly depends on multiple versions of the same package”

北城余情 提交于 2019-12-22 01:38:21
问题 After clearing out all of my cabal install ed packages, I ran this following session: $ cabal update Downloading the latest package list from hackage.haskell.org james@bast:~/.cabal/packages$ cabal install cabal-dev Resolving dependencies... Downloading cabal-dev-0.9.1... [1 of 1] Compiling Main ( /tmp/cabal-dev-0.9.124882/cabal-dev-0.9.1/Setup.hs, /tmp/cabal-dev-0.9.124882/cabal-dev-0.9.1/dist/setup/Main.o ) Linking /tmp/cabal-dev-0.9.124882/cabal-dev-0.9.1/dist/setup/setup ... Configuring