相关疑难解决方法(0)

如何使用仍然使用runhaskell/ghci运行的库+可执行文件来创建Haskell cabal项目?

如果你在一个小集团文件中声明库+可执行部分,而避免了图书馆的双重编译通过把图书馆变成一个hs-source-dirs目录下,你不能用通常运行项目ghci和runhaskell了,特别是如果可执行文件有辅助模块本身.

什么是推荐的项目布局

  • 只构建一次所需的东西
  • 允许使用 runhaskell
  • 有一个干净的结构,没有黑客?

haskell ghci cabal runhaskell

54
推荐指数
1
解决办法
7055
查看次数

为什么`stack build`改变我的.cabal文件?

我正在尝试构建一个使用Euterpea的项目.

运行stack build我收到以下错误,建议我需要添加Euterpea到build-depends我的.cabal文件部分.

$ 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 member of the hidden package ‘Euterpea-2.0.4’.
    Perhaps you need to add ‘Euterpea’ to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.

--  While building package composition-0.1.0.0 using:
      /home/matthew/.stack/setup-exe-cache/x86_64-linux-nix/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 …
Run Code Online (Sandbox Code Playgroud)

haskell cabal haskell-stack euterpea

3
推荐指数
1
解决办法
344
查看次数

如何根据其类型签名找到Haskell函数?

例如,我已经有一段时间没有使用Haskell了,忘记了const函数的名称,但是记得它的类型签名是a -> b -> a。

haskell

3
推荐指数
1
解决办法
57
查看次数

标签 统计

haskell ×3

cabal ×2

euterpea ×1

ghci ×1

haskell-stack ×1

runhaskell ×1