cabal

How to build a self-contained library with cabal?

☆樱花仙子☆ 提交于 2019-12-14 03:46:18
问题 I have a library which depends on some other libraries and of course the haskell runtime. It exports C API. I want to build it in a way that it was fully self-contained and user wouldn't be bothered with installing haskell, cabal and all the dependencies. 回答1: it was fully self-contained and user wouldn't be bothered with installing haskell, cabal and all the dependencies Then you must distribute your library with all its dependencies -- the Haskell compiler, runtime, C libraries, Cabal,

Using Fay in a cabal sandbox

瘦欲@ 提交于 2019-12-14 01:26:53
问题 I've just started using both cabal sandboxes and Fay. However, Fay seems unable to find the packages automatically, presumably as they are not in the 'global' cabal package database. I tried unsuccessfully to follow the advice on this wiki page, which to me looked like: ./cabal-sandbox/bin/fay.exe --base-path .cabal-sandbox/i386-windows-ghc-7.6.3/fay-base-0.19/src/ Frontend.hs But Fay still complains it cannot find package fay-base . Is there something I can do about this, or must I install

Haskell Cabal regenerate documentation for all installed packages

此生再无相见时 提交于 2019-12-14 00:46:12
问题 How can I generate and install documentation for all locally installed cabal packages? I turned on the documentation flag in ~/.cabal/config which means that all newly installed packages will have documentation also generated. But how to generate documentation for all already installed packages? Is there a way to automatically cabal install --reinstall all already installed packages? And more importantly, is that a good idea? 回答1: If you have a recent-ish version of cabal-install (>= 0.10, I

How should I go about testing a monolithic executable package?

依然范特西╮ 提交于 2019-12-13 12:31:10
问题 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

Cabal install error: The package has a './configure' script. This requires a Unix

心不动则不痛 提交于 2019-12-13 12:21:30
问题 I'm trying to install network and old-time with cabal-install. When I try to install either it fails with: setup.exe: The package has a './configure' script. This requires a Unix compatibility toolchain such as MinGW+MSYS or Cygwin. I do have MinGW, in fact it's the MinGW distributed along with GHC. I've also added the bin folder to my PATH. How can I fix this? what tool is the one actually running the configure files? maybe I need to get it? GHC 7.10.1 x64 cabal-install version 1.22.0.0

Error installing cuda module in Mac OS X 10.7.5 (checking whether the C compiler works… no)

╄→гoц情女王★ 提交于 2019-12-13 04:50:01
问题 I'm trying to install cuda package with cabal on Mac OS X 10.7.5. The haskell was installed with haskell platform 64bit mac version. ghc version is 7.6.3, gcc version is 4.2. >> cabal install cuda Resolving dependencies... [1 of 1] Compiling Main ( /var/folders/ng/h2hkycqd2q5g2hz42c47bt4w0000gn/T/cuda-0.5.1.1-59169/cuda-0.5.1.1/Setup.hs, /var/folders/ng/h2hkycqd2q5g2hz42c47bt4w0000gn/T/cuda-0.5.1.1-59169/cuda-0.5.1.1/dist/setup/Main.o ) Linking /var/folders/ng/h2hkycqd2q5g2hz42c47bt4w0000gn/T

How to automatically include Haskell C-sources through `Setup.hs` build script?

妖精的绣舞 提交于 2019-12-12 22:36:01
问题 In a Haskell project's cabal file we have the following sections: C-Sources: src/A.c , src/B.c , ... Includes: include/A.h , include/B.h , ... Unfortunately, wildcarding in these sections is not allowed (as confirmed here): -- this doesn't work: C-Sources: src/*.c Includes: include/*.h Question: How can one alter Setup.hs to automatically include src/*.c and include/*.h as above? 来源: https://stackoverflow.com/questions/41575528/how-to-automatically-include-haskell-c-sources-through-setup-hs

Cabal can't find foreign library when building on NixOS

做~自己de王妃 提交于 2019-12-12 13:30:42
问题 I am trying to build an internal Haskell project on NixOS using cabal2nix. It wraps (and thus depends on) a foreign library which on Ubuntu one would build by wget ting the source, then running make && make install && ldconfig . Thus when cabal goes to build the program, it is apparently able to find the appropriate header files (which are in /usr/local/include/ta-lib or /usr/include/ta-lib ). On Nix, the process as I understand is to setup a .nix file to specify how to get and build the

cabal install — global constraint requires installed instance

浪尽此生 提交于 2019-12-12 10:51:59
问题 My cabal dependencies are listed as base ==4.6.*, containers ==0.5.*, bytestring ==0.10.*, binary ==0.5.*, parsec ==3.1.* i did, cabal sandbox init wget http://www.stackage.org/lts/cabal.config cabal install --only-dependencies To overcome dependency conflicts, i am using sandbox installation. But still, cabal is talking about some global constraints which is confusing for me. Cabal dependency tree resolution gets screwed as, trying: parsec-3.1.8 (dependency of myproj-0.1.0.0) next goal: mtl

Haskell reinstall base with profiling enabled

谁说胖子不能爱 提交于 2019-12-12 08:23:26
问题 I am trying reinstall my Haskell libraries with profiling enabled by following the instructions listed here However, whenever cabal attempts to reinstall one of the libraries I get the following message: LibraryNameHere.hs:1:1: Could not find module `Prelude' Perhaps you haven't installed the profiling libraries for package `base'? Use -v to see a list of the files searched for. When I try to reinstall base with profiling enabled I get the following messages: me@machine:~/.cabal/$ cabal