[Hackage] #742: build-depends in Executable sections are unexpectedly global

Hackage cvs-ghc at haskell.org
Fri Sep 24 18:29:44 EDT 2010

#742: build-depends in Executable sections are unexpectedly global
  Reporter:  benmachine     |        Owner:      
      Type:  defect         |       Status:  new 
  Priority:  normal         |    Milestone:      
 Component:  Cabal library  |      Version:  HEAD
  Severity:  normal         |     Keywords:      
Difficulty:  unknown        |   Ghcversion:      
  Platform:                 |  
 When I have two executable sections, it seems that the build-depends of
 one are used in the other. For example, the following:

 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

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

     Ambiguous module name `Control.Monad.State':
       it was found in multiple packages: monads-tf- mtl-

 If this is intended (which I doubt) it's at least confusing.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/742>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list