cabal

C compiler selection in cabal package

南楼画角 提交于 2020-01-01 08:03:23
问题 I decided to add some flags to control the way that C source file is compiled (i.e. something like use-clang, use-intel etc.). C-Sources: c_lib/tiger.c Include-Dirs: c_lib Install-Includes: tiger.h if flag(debug) GHC-Options: -debug -Wall -fno-warn-orphans CPP-Options: -DDEBUG CC-Options: -DDEBUG -g else GHC-Options: -Wall -fno-warn-orphans Question is: which options in descritpion file need to be modified to change C compiler? I did found only CC-Options. 回答1: There really doesn't seem to be

Installing & Building GHC with OSX Mavericks GHC

南笙酒味 提交于 2020-01-01 07:28:31
问题 Why doesn't my GHC 7.6.3 work after upgrading to OSX Mavericks? 回答1: It took a long time to figure out how to Work with both OSX 10.9 and GHC 7.6.3, and here are some tips to help you get back to building haskell code. Summary: Download command line tools for mavericks and use gcc version 4.2 (link to the correct gcc path in your ghc settings file) Steps: Download the command line tools for mavericks Install gcc-4.2 using homebrew brew install apple-gcc42 Edit your settings file, Line 2.

Is it possible to use cmake for Haskell projects?

耗尽温柔 提交于 2020-01-01 04:18:06
问题 I am planning a project written in Haskell, maybe there are some parts in C as well. For the buildsystem I decided against the common choice for Haskell programs cabal, mainly because I want to learn how building programs in other languages works. I heard about CMake and I think it is a pretty cool product. Although I have no knowledge in how to use it, I want to use CMake for that project, just to find out how it works. Googleing did not reveal any facts about how to use cmake with haskell,

Cabal - Expose all modules while building library

孤街醉人 提交于 2019-12-31 19:02:49
问题 Is it possible to tell Cabal to expose all modules while building a library? Right now I have to provide very long list of modules in the Exposed-modules cabal configurtion file section. 回答1: The modern answer is stack + hpack instead of using explicit cabal config. It could automatically expose package modules and provides many other enhancements. 回答2: You have to list all modules in the cabal configuration file. In your case, you just put the list of modules after exposed-module: . There is

Cabal - Expose all modules while building library

删除回忆录丶 提交于 2019-12-31 19:02:33
问题 Is it possible to tell Cabal to expose all modules while building a library? Right now I have to provide very long list of modules in the Exposed-modules cabal configurtion file section. 回答1: The modern answer is stack + hpack instead of using explicit cabal config. It could automatically expose package modules and provides many other enhancements. 回答2: You have to list all modules in the cabal configuration file. In your case, you just put the list of modules after exposed-module: . There is

Why is `stack build` altering my .cabal file?

ぐ巨炮叔叔 提交于 2019-12-31 02:20:25
问题 I am attempting to build a project which uses Euterpea. Running stack build I get the following error, suggesting that I need to add Euterpea to the build-depends section of my .cabal file. $ sb composition-0.1.0.0: build (lib + exe) Preprocessing library composition-0.1.0.0... [2 of 2] Compiling Lib ( src/Lib.hs, .stack-work/dist/x86_64-linux-nix/Cabal-1.24.2.0/build/Lib.o ) /home/matthew/backup/composition/composition/src/Lib.hs:5:1: error: Failed to load interface for ‘Euterpea’ It is a

Why is `stack build` altering my .cabal file?

风流意气都作罢 提交于 2019-12-31 02:19:06
问题 I am attempting to build a project which uses Euterpea. Running stack build I get the following error, suggesting that I need to add Euterpea to the build-depends section of my .cabal file. $ sb composition-0.1.0.0: build (lib + exe) Preprocessing library composition-0.1.0.0... [2 of 2] Compiling Lib ( src/Lib.hs, .stack-work/dist/x86_64-linux-nix/Cabal-1.24.2.0/build/Lib.o ) /home/matthew/backup/composition/composition/src/Lib.hs:5:1: error: Failed to load interface for ‘Euterpea’ It is a

How to specify dependency on external C library in .cabal?

蓝咒 提交于 2019-12-30 02:03:26
问题 I maintain a library with FFI bindings on Hackage. So my Haskell library depends on the corresponding C library and its header files. Now I specify the external dependency in the .cabal file like this: PkgConfig-Depends: libfoo >= 1.2 And it works well for me in Linux. However, I have a user of the library who reports, that installing pkg-config on Windows is rather cumbersome, and instead he prefers Includes: foo.h Extra-libraries: foo I'd like my library to be as easy to build as possible,

How to specify dependency on external C library in .cabal?

风流意气都作罢 提交于 2019-12-30 02:03:25
问题 I maintain a library with FFI bindings on Hackage. So my Haskell library depends on the corresponding C library and its header files. Now I specify the external dependency in the .cabal file like this: PkgConfig-Depends: libfoo >= 1.2 And it works well for me in Linux. However, I have a user of the library who reports, that installing pkg-config on Windows is rather cumbersome, and instead he prefers Includes: foo.h Extra-libraries: foo I'd like my library to be as easy to build as possible,

What's the reason behind cabal (dependency) hell?

吃可爱长大的小学妹 提交于 2019-12-29 07:36:29
问题 How does dependency hell happen in Cabal-install? I read the following at Cabal/Survival - HaskellWiki: 1. What is the difficulty caused by Cabal-install? The main difficulty with Cabal is otherwise known as 'dependency hell', in which the cabal-install does not manage to install a desired package for a reason or another, leading to large amount of manual work. As an example of this difficulty, consider a case where the user wishes to install packages A and B. Both of these work with package