[Hackage] #179: support GHC's main-is extension

2007-11-15 Thread Hackage
#179: support GHC's main-is extension
--+-
  Reporter:  duncan   |Owner: 
  Type:  enhancement  |   Status:  new
  Priority:  normal   |Milestone: 
 Component:  Cabal|  Version:  1.2.2.0
  Severity:  normal   | Keywords: 
Difficulty:  normal   |   Ghcversion:  6.4.2  
  Platform:  Linux|  
--+-
 Query on haskell-cafe: http://haskell.org/pipermail/haskell-
 cafe/2007-November/034686.html

 {{{
 It seems the meaning of the -main-is switch for GHC and the Main-Is
 build option for Cabal executables differ. With GHC, I can point to
 any function main in any module, but in Cabal I must point to a
 filename with precisely the module name Main. This is tying my hands
 with regard to organizing a default executable and exposing some of
 its functionality as a library. Is there a way to get around this
 restriction?

 Concretely, I want to point Cabal's Main-Is to Program/Main.hs
 which starts with

   module Program.Main where

 instead of just

   module Main where
 }}}

 So in GHC it has this meaning:

 http://haskell.org/ghc/docs/latest/html/users_guide/options-phases.html
 #options-linker

 {{{
 -main-is thing

 The normal rule in Haskell is that your program must supply a
 main function in module Main. When testing, it is often
 convenient to change which function is the main one, and
 the -main-is flag allows you to do so. The thing can be one of:

 A lower-case identifier foo. GHC assumes that the main
 function is Main.foo.

 An module name A. GHC assumes that the main function
 is A.main.

 An qualified name A.foo. GHC assumes that the main
 function is A.foo.
 }}}

 In Cabal the {{{main-is:}}} field specifies the '''file name''' of the
 Main module.

 GHC's {{{-main-is}}} flag is an extension to Haskell that is not supported
 by the other Haskell implementations.

-- 
Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/179
Hackage http://haskell.org/cabal/
Hackage: Cabal and related projects___
cabal-devel mailing list
cabal-devel@haskell.org
http://www.haskell.org/mailman/listinfo/cabal-devel


Re: [Hackage] #179: support GHC's main-is extension

2007-11-15 Thread Hackage
#179: support GHC's main-is extension
--+-
  Reporter:  duncan   |Owner: 
  Type:  enhancement  |   Status:  new
  Priority:  normal   |Milestone: 
 Component:  Cabal|  Version:  1.2.2.0
  Severity:  normal   |   Resolution: 
  Keywords:   |   Difficulty:  normal 
Ghcversion:  6.4.2| Platform:  Linux  
--+-
Comment (by duncan):

 So the question is how would we support this extension? Perhaps by
 specifying a module name for {{{main-is:}}} ? Would that be
 distinguishable from a file name? It wouldn't have a file extension.
 Perhaps it'd be better to be explicit and specify {{{main-module-is:
 Foo.Bar}}}.

 Note that we do need both a file name and a module name because we have to
 pass that file to ghc since it's very common for people to use main
 modules that are not called {{{Main.hs}}}.

-- 
Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/179#comment:1
Hackage http://haskell.org/cabal/
Hackage: Cabal and related projects___
cabal-devel mailing list
cabal-devel@haskell.org
http://www.haskell.org/mailman/listinfo/cabal-devel


[Hackage] #180: configure should warn if a declared licence file is missing

2007-11-15 Thread Hackage
#180: configure should warn if a declared licence file is missing
-+--
  Reporter:  duncan  |Owner: 
  Type:  defect  |   Status:  new
  Priority:  low |Milestone: 
 Component:  Cabal   |  Version:  1.2.2.0
  Severity:  normal  | Keywords: 
Difficulty:  normal  |   Ghcversion:  6.4.2  
  Platform:  Linux   |  
-+--
 There are a few packages around which declare
 {{{
 license-file: LICENSE
 }}}

 but then that LICENSE file actually does not exist. Currently we do not
 discover this until we try and install at which point we get the unhelpful
 error:
 {{{
 setup: LICENCE: copyFile: does not exist (No such file or directory)
 }}}

 It would be much more helpful to users and developers alike if we warned
 in the configure step if the file was missing.

 This is partly a transitional issue, since older versions of Cabal did not
 install license files at all, so it never noticed.

-- 
Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/180
Hackage http://haskell.org/cabal/
Hackage: Cabal and related projects___
cabal-devel mailing list
cabal-devel@haskell.org
http://www.haskell.org/mailman/listinfo/cabal-devel