cabal

How to change path of cabal config file?

…衆ロ難τιáo~ 提交于 2019-12-19 06:13:18
问题 I am using HaskellPlatform-2012.4.0.0 on Win7. It's installed as portable. Paths are managed through .bat file so ghci and ghc works. But cabal installs it self at C:\Users\name\AppData\Roaming\cabal\ To circumvent that I did: cabal update edit config file delete all files except config Changed paths: remote-repo-cache: d:\h1\cabal\packages world-file: d:\h1\cabal\world build-summary: d:\h1\cabal\logs\build.log It works, but it's far from truly portable. Cabal config is bigger problem. It

Enable --hyperlink-source for “cabal install”

随声附和 提交于 2019-12-18 12:49:56
问题 The command cabal haddock has very useful --hyperlink-source option. I would like to have the source hyperlinked when building documentation with cabal install . The ticket #517 seems to be just about it: http://hackage.haskell.org/trac/hackage/ticket/517 However, perhaps it is possible to set this flag via ~/.cabal/config file? If not, how can I get working cabal-install build with the patch from #517 without installing Cabal-1.9, which is currently mandatory (due to one patch from December)

Profiling builds with Stack

我与影子孤独终老i 提交于 2019-12-18 09:59:50
问题 How do I tell stack to build my executable and all its dependencies with -prof ? Simply adding it to ghc-options in the .cabal file is not enough, because it only tries to build the executable with profiling enabled, which fails. 回答1: Profiling builds with Stack 1.0.0 and newer To build with profiling enabled: stack build --profile You may need to run stack clean first , but this should be fixed in Stack 1.5.0. To profile: stack exec --profile -- <your program> +RTS <profiling options> where

MacOSX - cabal install: built failed during the building phase. The exception was: ExitFailure 1 - dist/package.conf.inplace: inappropriate type

故事扮演 提交于 2019-12-18 09:37:17
问题 using cabal; came accross this error. did cabal install and this happened . failed during the building phase. The exception was: ExitFailure 1 checked my log; it said : dist/package.conf.inplace: inappropriate type I have 0 ideas what's going on. cabal build works though . #STRANGE CURRENTLY: CABAL version: 1.22.0.0. Glorious Glasgow Haskell Compilation version: 7.8.4 回答1: Possible explanation: you have upgraded GHC to 7.10, which does things a bit differently I gather, but not upgraded cabal

Installing Haskell on Windows, cabal config

只谈情不闲聊 提交于 2019-12-18 09:02:34
问题 I'm installing Haskell on Windows based on the instructions at https://www.haskell.org/platform/ and looking at step 3, it says, Modify your cabal config file (you can verify the location by running "cabal user-config init") to contain the following lines: extra-prog-path: C:\Program Files\Haskell Platform\8.0.2\msys\usr\bin extra-lib-dirs: C:\Program Files\Haskell Platform\8.0.2\mingw\lib extra-include-dirs: C:\Program Files\Haskell Platform\8.0.2\mingw\include But the auto generated config

Installing Haskell on Windows, cabal config

流过昼夜 提交于 2019-12-18 09:02:21
问题 I'm installing Haskell on Windows based on the instructions at https://www.haskell.org/platform/ and looking at step 3, it says, Modify your cabal config file (you can verify the location by running "cabal user-config init") to contain the following lines: extra-prog-path: C:\Program Files\Haskell Platform\8.0.2\msys\usr\bin extra-lib-dirs: C:\Program Files\Haskell Platform\8.0.2\mingw\lib extra-include-dirs: C:\Program Files\Haskell Platform\8.0.2\mingw\include But the auto generated config

Statically linking a C library with a Haskell library

一世执手 提交于 2019-12-17 23:28:07
问题 I have a Haskell project that aims to create some C++ bindings. I've written the C wrappers and compiled them into a stand-alone statically linked library. I'd like to write the Haskell bindings to link statically to the C wrappers so that I don't have to distribute the C wrappers separately but I can't seem to get it working and would appreciate some help. I specify the C library as an extra library but my cabal build step doesn't seem to add it to compile command. I've created a small

Stack build fails due to missing package although stack ghci works

北慕城南 提交于 2019-12-17 20:41:20
问题 I am trying to build a simple program in Haskell using stack. I created a new project using stack new and did a stack setup after that. The template builds fine. I want to experiment with binary file parsing, so I imported Data.ByteString . My build-depends in the cabal file look like this: build-depends: base >= 4.7 && < 5 , bytestring >= 0.10.6 , binary >= 0.7.5 stack ghci now just works, but stack build is still not happy. Can someone tell me what I did wrong here? Here is the complete

Cabal output is redirected but not generated

时光毁灭记忆、已成空白 提交于 2019-12-17 16:57:27
问题 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 &&

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

China☆狼群 提交于 2019-12-17 15:24:53
问题 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