cabal

How to use detailed-0.9 in cabal testing

六月ゝ 毕业季﹏ 提交于 2019-12-01 18:19:46
I'm having a surprising amount of difficulty getting the unit tests to run under cabal. I've copied the test code verbatim from the cabal documentation , with the exception of changing the module name {-# LANGUAGE FlexibleInstances #-} module Test.Integral ( tests ) where import Distribution.TestSuite instance TestOptions (String, Bool) where name = fst options = const [] defaultOptions _ = return (Options []) check _ _ = [] instance PureTestable (String, Bool) where run (name, result) _ | result == True = Pass | result == False = Fail (name ++ " failed!") test :: (String, Bool) -> Test test =

Haskell - Packaging cabal package with custom preprocessors

你离开我真会死。 提交于 2019-12-01 17:27:21
I've implemented a custom preprocessor which creates *.hs files form *.tpl files. It is specified in Setup.hs by using a Build-Type: Custom . Everything works fine, but I can't create tar.gz package from it (using cabal sdist ). Cabal complains, that it can not find the exposed modules which are generated by the preprocessor. The error message is cabal: Error: Could not find module with any suffix: ["gc","chs","hsc","x","y","ly","cpphs","hs","lhs"] How can I make Cabal aware of the fact that the module is not missing, or maybe add tpl to the known file extensions, or something? This is a known

Haskell hoogle installed through cabal, but hoogle command not found

徘徊边缘 提交于 2019-12-01 17:07:57
The hoogle (hoogle-4.2.36) installation process looks successful, except that when typing "hoogle" at the command line, it complains "hoogle: command not found". Tried this on two machines (both running MAC OS X Yosemite), they failed exactly the same way. Any suggestions to resolve this? Thanks! Thanks to your information, I found my "hoogle" executable in ".cabal/bin". Alas, why doesn't cabal add it to PATH? 来源: https://stackoverflow.com/questions/27328678/haskell-hoogle-installed-through-cabal-but-hoogle-command-not-found

Haskell - Packaging cabal package with custom preprocessors

◇◆丶佛笑我妖孽 提交于 2019-12-01 17:04:19
问题 I've implemented a custom preprocessor which creates *.hs files form *.tpl files. It is specified in Setup.hs by using a Build-Type: Custom . Everything works fine, but I can't create tar.gz package from it (using cabal sdist ). Cabal complains, that it can not find the exposed modules which are generated by the preprocessor. The error message is cabal: Error: Could not find module with any suffix: ["gc","chs","hsc","x","y","ly","cpphs","hs","lhs"] How can I make Cabal aware of the fact that

Upgrade Cabal on Ubuntu 14.04

青春壹個敷衍的年華 提交于 2019-12-01 16:57:11
When I install Haskell/GHC+cabal via sudo apt-get I installed cabal version 1.16. This is obviously not the most up to date version. How would I go about upgrade to at least version 1.18? I tried doing sudo apt-get update and sudo apt-get upgrade . Edit: Also when I run cabal install cabal-install it appears to "install" version 1.20 but when I run cabal -V it says cabal 1.16.0 Fixed it by adding the following line to my ~/.profile : export PATH=$(HOME)/.cabal/bin:$PATH 来源: https://stackoverflow.com/questions/25902613/upgrade-cabal-on-ubuntu-14-04

help with cabal install package shadowing errors

自作多情 提交于 2019-12-01 16:44:46
问题 I've run into the same error for two unrelated packages now, missingpy and monadiccp. > cabal install -p -v monadiccp (after some output) Creating dist/build (and its parents) /usr/local/haskell/bin/ghc --make -package-name monadiccp-0.7.0 -hide-all-packages -fbuilding-cabal-package -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -Ilib -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id Monatron-0.3

put command line arguments for tests in cabal file?

霸气de小男生 提交于 2019-12-01 16:07:02
Is there a way to write command line arguments for tests (exitcode-stdio-1.0) in the cabal file? I can run the tests manually with cabal test --test-options="foo bar" but I don't want to (re-)type this. There is no way to do this. As the comments suggest, if there are default options for the test-suite, they should just be baked into the executable. Command line options are intended only for overriding or modifying those default options. There is no way to add additional options in the cabal file 来源: https://stackoverflow.com/questions/28902169/put-command-line-arguments-for-tests-in-cabal

Upgrade Cabal on Ubuntu 14.04

爷,独闯天下 提交于 2019-12-01 15:48:29
问题 When I install Haskell/GHC+cabal via sudo apt-get I installed cabal version 1.16. This is obviously not the most up to date version. How would I go about upgrade to at least version 1.18? I tried doing sudo apt-get update and sudo apt-get upgrade . Edit: Also when I run cabal install cabal-install it appears to "install" version 1.20 but when I run cabal -V it says cabal 1.16.0 回答1: Fixed it by adding the following line to my ~/.profile : export PATH=$(HOME)/.cabal/bin:$PATH 来源: https:/

How to get cabal to ignore the global package DB when using a sandbox

我是研究僧i 提交于 2019-12-01 15:28:40
I'm trying to install two libraries, Elm and yesod-platform , using a cabal sandbox on Ubuntu. The problem is, I'm using xmonad as my window manager. Thus, a bunch of Haskell libraries have been installed by my package manager. When trying to resolve dependencies, it's using the versions of the libraries installed by apt, and thus is giving a "maximum backjumps exceeded" error. How can I instruct Cabal to ignore any packages not in the Cabal sandbox, so that it will install fresh versinos of these packages in the sandbox and be able to resolve the dependcies? Too late probably, but still… I

put command line arguments for tests in cabal file?

半世苍凉 提交于 2019-12-01 15:08:06
问题 Is there a way to write command line arguments for tests (exitcode-stdio-1.0) in the cabal file? I can run the tests manually with cabal test --test-options="foo bar" but I don't want to (re-)type this. 回答1: There is no way to do this. As the comments suggest, if there are default options for the test-suite, they should just be baked into the executable. Command line options are intended only for overriding or modifying those default options. There is no way to add additional options in the