我有以下问题:
我有两个相互依赖的Haskell库,这两个库都是由cabal管理的.相应的cabal文件如下所示:
图书馆1:
name: Lib1
version: 0.1
cabal-version: >=1.2
build-type: Simple
author: Matthias
library
hs-source-dirs: src
build-depends:
base >= 4,
Lib2
ghc-options: -Wall
exposed-modules: <...>
Run Code Online (Sandbox Code Playgroud)
图书馆2:
name: Lib2
version: 0.1
cabal-version: >=1.2
build-type: Simple
author: Matthias
library
hs-source-dirs: src
build-depends:
base >= 4,
Lib1
ghc-options: -Wall
exposed-modules: <...>
Run Code Online (Sandbox Code Playgroud)
使用cabal install作品安装其中一个库(此处为库2):
Resolving dependencies...
In order, the following will be installed:
Lib2-0.1 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring Lib2-0.1...
Building Lib2-0.1...
Preprocessing library Lib2-0.1...
Registering …Run Code Online (Sandbox Code Playgroud)