haskell - managing two libraries with cabal that depend on each other -


i've got following question:

i've got 2 haskell libraries depend on each other, , both libraries managed cabal. corresponding cabal files this:

library 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:   <...> 

library 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: <...> 

installing 1 of libraries (here library 2) cabal install works:

resolving dependencies... in order, following installed: lib2-0.1 (reinstall) warning: note reinstalls dangerous. continuing anyway... configuring lib2-0.1... building lib2-0.1... preprocessing library lib2-0.1... registering lib2-0.1... installing library in c:\users\matthias\appdata\roaming\cabal\lib2-0.1\ghc-7.4.2 registering lib2-0.1... 

but trying install other library (here library 1) cabal install results in dependency error:

resolving dependencies... cabal.exe: not resolve dependencies: trying: lib1-0.1 (user goal) next goal: lib2 (dependency of lib1-0.1) rejecting: lib2-0.1/installed-aa4... (package broken) 

is there way handle 2 such libraries depend on each other don't dependency errors or cabal not able handle such case properly?

as others have said, circular dependencies never going work in cabal. it's hard enough compile modules circular dependencies, packages hopeless cause.

it can annoyingly difficult sometimes, real solution find way break circular dependency somehow.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -