[Hackage] #370: Check for use of -X flags on upload

Hackage trac at galois.com
Mon Oct 13 16:32:51 EDT 2008

#370: Check for use of -X flags on upload
  Reporter:  guest          |        Owner:           
      Type:  defect         |       Status:  new      
  Priority:  normal         |    Milestone:  Cabal-2.0
 Component:  Cabal library  |      Version:  HEAD     
  Severity:  normal         |   Resolution:           
  Keywords:                 |   Difficulty:  normal   
Ghcversion:  6.8.2          |     Platform:           
Changes (by duncan):

  * milestone:  HackageDB => Cabal-2.0


 Closely related to this is the problem that the `extensions` field does
 not quite mean what we want. It currently means to apply those excetions
 to all the modules in the package, but what we want it to mean is that
 this package uses these extensions (and not all modules need use all the

 I fear we need a different name for this meaning or we'll break lots of
 existing packages. We can gradually move to the new system.

 Eg use

   uses-extensions: Foo, Bar

 This is a declaration to the outside world that this library uses these
 extensions, however it does not mean that we pass -XFoo -XBar when
 buliding this library. We expect the .hs files to use the `LANGUAGE`
 pragma. This `uses-extensions` field would just be the union of all the
 extensions listed in the `LANGUAGE` pragma.

 The next question would be how to enforce that the declaration is
 accurate. We could parse the OPTIONS and LANGUAGE pragmas to extract the
 languages used.

 Note also that we should be encouraging the use of the portable `LANGUAGE`
 pragma, not ghc's `-X` flags.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/370#comment:1>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list