cabal

How can I use GHCi with the new cabal 1.17 sandboxes?

旧街凉风 提交于 2019-11-28 06:44:10
I've been trying out cabal head which has support for sandboxes similar to cabal-dev. However there's not yet support for a cabal-dev ghci equivalent and apparently no support planned for the next release. Is there some incantation I can use to work around this and get something similar to cabal-dev ghci ? edit (August 2013): The cabal repl patches have recently been merged. This functionality will be a part of the next release. As of this writing, there is no easy-to-use analogue to cabal-dev ghci . We plan to add a cabal repl command in the future - however, at the moment this functionality

Mountain Lion X11 libraries can't ./configure

南楼画角 提交于 2019-11-28 03:49:21
问题 I'm trying to build xmonad in Mountain Lion to run with Xquartz 2.7.2, tutorial found here . I'm using cabal to get required X11 libraries cabal install X11-1.5.0.1 . That didn't work, so I got the tar and tried building it with ghc, same error. It won't configure: Resolving dependencies... Configuring X11-1.5.0.1... configure: WARNING: unrecognized options: --with-compiler, --with-gcc checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output

How to make a Haskell cabal project with library+executables that still run with runhaskell/ghci?

只谈情不闲聊 提交于 2019-11-28 03:06:05
If you declare a library + executable sections in a cabal file while avoiding double compilation of the library by putting the library into a hs-source-dirs directory, you cannot usually run your project with ghci and runhaskell anymore, especially if the executables have helper modules themselves. What is a recommended project layout that only builds what is needed once allows using runhaskell has a clean structure without hacks? nh2 Let's assume you have a mylib library, and mylib-commandline and mylib-server executables. You use hs-source-dirs for the library and each executable so that

Using cabal with multiple GHC versions

孤街醉人 提交于 2019-11-28 02:39:50
问题 I got both ghc6 and ghc7 on my desktop. To install new packages (for the specific ghc version), I use cabal with the flag --with-compiler=<ghc-dir> to specify for which ghc i want the package installed. I do cabal update before installing any new package. But how to I specify for which ghc I want the update? I mean, there is no --with-compiler flag as with cabal install . I would think that just like I use ghc-pkg7 for ghc7, there would be cabal7 . Apart from the cabal install command which I

Cabal output is redirected but not generated

故事扮演 提交于 2019-11-28 01:51:46
I have a fairly simple haskell project set up, where I just want to have the framework working with testing and so on before I actually start coding. I have my source files for an executable in a /src directory (where / is the project's root) and my tests in a /testsuite directory. /testsuite contains a simple test file called TestSuite.hs with main = Test.Framework.defautMain tests as the implementation of main. The problem is, when I run cabal clean && cabal configure --enable-tests && cabal build I get the warning output was redirected with -o, but no output will be generated because there

Statically link GMP to an Haskell application using GHC (+ LLVM)

假如想象 提交于 2019-11-27 20:12:08
How can I drop dynamic dependency on libgmp and go from this: linux-vdso.so.1 => (0x00007fffdccb1000) libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fb01afc1000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb01acc7000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb01aabe000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb01a8ba000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb01a69d000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb01a2df000) /lib64/ld-linux-x86-64.so.2 (0x00007fb01b249000) to this (currently desired)

How to reduce duplication in the build-depends fields of a .cabal file?

泄露秘密 提交于 2019-11-27 17:48:11
Here's a .cabal file: Name: myprogram Version: 0.1 -- blah blah blah Cabal-version: >=1.9.2 Executable myprogram HS-source-dirs: src Main-is: Main.hs Build-depends: attoparsec == 0.10.*, base == 4.3.*, -- long long list of packages Test-Suite test HS-source-dirs: test, src Type: exitcode-stdio-1.0 Main-is: Main.hs Build-depends: attoparsec == 0.10.*, base == 4.3.*, -- long long list of packages QuickCheck == 2.4.* Is there any way I can replace the long list of build-depends packages for the test suite with "same as for the executable, plus QuickCheck"? Edit: version information. cabal-dev 0.9

My cabal packages are FUBAR; how can I purge them and start over?

倾然丶 夕夏残阳落幕 提交于 2019-11-27 09:23:42
问题 I forgot to enable building libs for profiling in my ~/.cabal/config before installing a bunch of packages on a new machine and now a --reinstall world to try to fix the situation has left everything broken (naturally). I think it's a better use of my time to just purge everything. How do I do that correctly? 回答1: Cabal doesn't keep track of what it's installed, it just uses ghc's library mechanism (or that of some other compiler if you're not using ghc), so you can use rm -r ~/.ghc to remove

Have I upgraded my cabal-install?

强颜欢笑 提交于 2019-11-27 02:04:19
问题 I just installed Haskell from it's official site. After that, following it's quick-start tutorial. I run: cabal update Which shows this message: Downloading the latest package list from hackage.haskell.org Note: there is a new version of cabal-install available. To upgrade, run: cabal install cabal-install I run: cabal install cabal-install and check if the update was successful with cabal update The result, it shows me the same message from the start: Downloading the latest package list from

How can I use GHCi with the new cabal 1.17 sandboxes?

旧时模样 提交于 2019-11-27 01:27:56
问题 I've been trying out cabal head which has support for sandboxes similar to cabal-dev. However there's not yet support for a cabal-dev ghci equivalent and apparently no support planned for the next release. Is there some incantation I can use to work around this and get something similar to cabal-dev ghci ? 回答1: edit (August 2013): The cabal repl patches have recently been merged. This functionality will be a part of the next release. As of this writing, there is no easy-to-use analogue to