Ticket #742 (closed defect: fixed)
build-depends are unexpectedly global prior to Cabal-1.8 (needs documenting)
| Reported by: | benmachine | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Cabal library | Version: | HEAD |
| Severity: | normal | Keywords: | |
| Cc: | Difficulty: | unknown | |
| GHC Version: | Platform: |
Description
When I have two executable sections, it seems that the build-depends of one are used in the other. For example, the following:
state.cabal
Cabal-Version: >= 1.2 Name: state Version: 0.1 Build-type: Simple Executable state-tf Main-is: Main.hs Build-depends: base, transformers, monads-tf Executable state-mtl Main-is: Main.hs Build-depends: base, mtl
Main.hs
module Main where import Control.Monad.State main = print $ runState (put ()) undefined
fails to compile:
Preprocessing executables for state-0.1...
Building state-0.1...
Main.hs:3:7:
Ambiguous module name `Control.Monad.State':
it was found in multiple packages: monads-tf-0.1.0.0 mtl-1.1.1.0
If this is intended (which I doubt) it's at least confusing.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

