cabal

Cabal rebuild all with enable-shared flag

家住魔仙堡 提交于 2019-12-09 18:06:24
问题 I am having an issue with building a shared library with ghc and I think I need to rebuild my haskell packages with --enable-shared, is there an easy way to rebuild all of my packages with cabal with the flag --enable-shared? 回答1: If you have a ~/.cabal/world, cabal install --reinstall --enable-shared world could work, but test with the --dry-run flag first. That will, however only take care of cabal-installed packages. If you have packages installed with your distro's package manager, the

Haskell: Testing a package against multiple versions of base for Hackage

南笙酒味 提交于 2019-12-09 16:09:49
问题 I'm trying to upload my first package to Hackage (yay!), and I got this error: The dependency 'build-depends: base' does not specify an upper bound on the version number. Each major release of the 'base' package changes the API in various ways and most packages will need some changes to compile with it. The recommended practise is to specify an upper bound on the version of the 'base' package. This ensures your package will continue to build when a new major version of the 'base' package is

zlib build error with GHC

橙三吉。 提交于 2019-12-09 15:03:06
问题 I'm using a VM with the following configuration: Arch Linux (3.0-ARCH kernel) GHC 7.0.3 cabal-install 0.10.2 Cabal library 1.10.1.0 When I try to build zlib using cabal... $ cabal install zlib I get the following output: Resolving dependencies... Downloading zlib-0.5.3.2... Configuring zlib-0.5.3.2... Preprocessing library zlib-0.5.3.2... Stream.hsc:86:21: error: missing binary operator before token "(" Stream.hsc: In function ‘main’: Stream.hsc:86:21: error: missing binary operator before

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

谁都会走 提交于 2019-12-09 12:56:16
问题 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

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

浪子不回头ぞ 提交于 2019-12-09 12:38:52
问题 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? 回答1: There

Why cabal sandbox init does not change PATH like virtualenv does?

試著忘記壹切 提交于 2019-12-09 10:40:25
问题 Haskell newbie and Python guy here. I think I may be missing something here but if you look at Yesod's quickstart, the autor install some packages before cabal sandbox init . I have seen the same pattern elsewhere. Questions: Am I missing something? Is this the real way to use cabal sandbox? Why can't (or shouldn't) I install yesod-bin inside a sandbox? What if I use different versions of yesod-bin throughout some projects? If there is some libraries that install binaries inside .cabal

How do i use runhaskell with cabal-dev?

穿精又带淫゛_ 提交于 2019-12-09 08:36:33
问题 Unfortunately cabal-dev ghci does not work in this project, i get an error: Loading package download-0.3.2 ... linking ... ghc: /home/stulli/haskell/ifdl/cabal-dev//lib/download-0.3.2/ghc-7.4.1/HSdownload-0.3.2.o: unknown symbol `stat64' ghc: unable to load package `download-0.3.2' So i try runhaskell, but it uses the packages that come installed with cabal instead of cabal-dev and thus fails. update: runhaskell produces the same error: $ runhaskell -isrc:src/test -package-conf=cabal-dev

How to link custom object file with Haskell library?

北战南征 提交于 2019-12-09 07:41:14
问题 I've created a Haskell package that makes FFI calls to functions defined in CUDA code. I'd like to compile .cu file to an object (.o) file during package build and force linker to link it in. So far, I tried to use a technique found this question. I've customized buildHook to: run nvcc run default buildHook create ar library file with nvcc compiled code. Setup.hs is available here. This solution has a major disadvantage in restricting this package to static linking. Although cabal produces a

GHC cannot find libraries on fresh install of Haskell-Platform

旧街凉风 提交于 2019-12-09 04:30:35
I'm trying to learn how to use Haskell, but I've run into a little roadblock. I'm using MacOSX 10.12.6 and installed Haskell Platform using: $ brew cask install haskell-platform with no modifications. When I try to compile a program with parsec imported, Haskell-Platform can't find it: $ ghc -v test.hs ... package parsec-3.1.11-DPgnR92AWEaFOaixmwipet is unusable due to shadowed dependencies: mtl-2.2.1-19EL8AGBsN3DnnOhrC9xY3 text-1.2.2.2-EGUst8sqNAZCw1xLPcmcMH ... test.hs:2:1: error: Could not find module ‘Text.Parsec’ Locations searched: Text/Parsec.hs Text/Parsec.lhs Text/Parsec.hsig Text

Installing Haskell Gloss

馋奶兔 提交于 2019-12-08 15:58:32
问题 I'm having the most difficult time trying to understand what I am doing wrong with installing haskell on windows. I've downloaded the platform binary and ran the .exe file. Afterwards the instructions on their hackage website tells me to run cabal install gloss. Whenever I try this in their GHCI shell, I get the following errors: <interactive>:1:1: Not in scope 'cabal' <interactive>:1:7: Not in scope 'install' <interactive>:1:15: Not in scope 'gloss' I know for a fact cabal install gloss isn