cabal

Error with cabal update

孤人 提交于 2020-01-05 12:33:54
问题 On a fresh install install of Haskell-Platform (64 bit OSX version from http://www.haskell.org/platform/mac.html) I get the following error: Downloading the latest package list from hackage.haskell.org Warning: http error: Network.Browser.request: Error raised ErrorParse "Invalid cabal: Char.intToDigit: not a digit -1 After issuing the command cabal update . No luck with any searches and I have no idea where this error is coming from. 回答1: I had the same problem. The only workaround I could

Programmatically Listing `C-sources` in Haskell Cabal Files

社会主义新天地 提交于 2020-01-05 05:44:06
问题 I am involved in a Haskell project which involves a lot of C FFI. Thus, for every src/HaskellFile.hs I have in my project, I have a corresponding src/HaskellFile.c C source file. This means I have to manually this all of these C sources in my cabal project: C-sources: src/HaskellFile1.c, src/HaskellFile2.c ...and so forth. Question: Is it possible to programmatically list out these files in my cabal project file? Something like: C-sources: src/*.c ..? (For the record, I tried the above and it

Trying to install Image.Codec.DevIL under windows. Needs pthread and IL. Can't get IL to work

橙三吉。 提交于 2020-01-05 02:51:07
问题 This is the output from cabal install codec-image-devil : Resolving dependencies... Configuring Codec-Image-DevIL-0.2.3... cabal: Missing dependency on a foreign library: * Missing C library: IL This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. cabal:

flycheck-haskell and doctest don't work on Cabal 3.0 v2-build project

為{幸葍}努か 提交于 2020-01-04 07:55:14
问题 I tried to create a Nix-style local build (v2-build) project on Cabal 3.0. But several development tools (flycheck-haskell and doctest) don't work. They worked on new-build project on Cabal 2.4. Error message says they cannot find dependencies, as far as I read. $ cabal v2-clean $ cabal v2-build $ cabal v2-test Build profile: -w ghc-8.8.1 -O1 In order, the following will be built (use -v for more details): - hstest9-0.1.0.0 (test:doctestd) (first run) Configuring test suite 'doctestd' for

Cabal getting installed in root directory instead of /home/vagrant directory using Vagrantfile

扶醉桌前 提交于 2020-01-04 05:23:07
问题 THe below is the content of the vagrant file. When I run vagrant up command, it installs cabal as required but it is in the root directory. Hence, it becomes unusable. I want to update the cabal version to latest version using cabal update . But it is not happening. Finally, in my VM, I have old version of cabal which comes with haskell-platform which is of no use to me. However, when I execute these commands separately by explicitly logging into VM, and not putting anything in Vagrantfile,

Cabal 2.0 required when using a nightly snapshot with stack

拜拜、爱过 提交于 2020-01-03 12:28:10
问题 I'm trying to setup a new project using the nightly-2017-08-17 snapshot stack new test --resolver nightly-2017-08-17 However this gives the following error: Downloading template "new-template" to create project "test" in test/ ... Looking for .cabal or package.yaml files to use to init the project. Using cabal packages: - test/test.cabal Selected resolver: nightly-2017-08-17 Unable to parse cabal file: FromString "This package requires at least Cabal version 2.0" Nothing Cabal is in its

Configuring cabal on Max OS X 10.9

最后都变了- 提交于 2020-01-03 02:21:32
问题 When I run cabal install Cabal cabal-install I have this warning: Warning: The directory /Users/arthurfayzrakhmanov/Library/Haskell/ghc-7.6.3/lib/cabal-install-1.18.0.2/bin is not in the system search path. Looks like something misconfigured, because I saw similar message when I've installed happy , but it pointed to /Users/arthurfayzrakhmanov/Library/Haskell/ghc-7.6.3/lib/happy... . How should I configure cabal on OS X 10.9.1, I mean PATH and etc. 回答1: Open your ~/.bash_profile with any

Why can't cabal build mighttpd2 dynamically?

£可爱£侵袭症+ 提交于 2020-01-02 08:12:09
问题 GHC is too slow when it links my executable statically, so I want to test using "-dynamic" options. The following two commands cause the same error although cabal install mighttpd2 is ok. $cabal install --ghc-options=-dynamic mighttpd2 $cabal install --enable-executable-dynamic mighttpd2 Linking dist/build/mkindex/mkindex ... Preprocessing executable 'mightyctl' for mighttpd2-2.7.1... Process.hs:11:8: Could not find module `Data.Conduit.Process' Perhaps you haven't installed the "dyn"

Why can't cabal build mighttpd2 dynamically?

核能气质少年 提交于 2020-01-02 08:12:07
问题 GHC is too slow when it links my executable statically, so I want to test using "-dynamic" options. The following two commands cause the same error although cabal install mighttpd2 is ok. $cabal install --ghc-options=-dynamic mighttpd2 $cabal install --enable-executable-dynamic mighttpd2 Linking dist/build/mkindex/mkindex ... Preprocessing executable 'mightyctl' for mighttpd2-2.7.1... Process.hs:11:8: Could not find module `Data.Conduit.Process' Perhaps you haven't installed the "dyn"

Why does “cabal init” break “ghc-mod check”?

时光总嘲笑我的痴心妄想 提交于 2020-01-02 07:13:35
问题 ghc-mod works in a directory with just a haskell source file but if I run "cabal init" in that directory (/tmp/test), I get the following error: (p1)dave@peach:/tmp/test$ !ghc ghc-mod check Main.hs ghc-mod: /tmp/test/dist/setup-config: hGetContents: invalid argument (invalid byte sequence) What's going wrong here? I'm running ghc-mod 5.2.11, and cabal 1.21.1.0, on a 64 bit ubuntu 14.04 computer. the LANG environment variable is set to en_US.UTF-8 ( I saw responses to some other questions that