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

Hackage trac at galois.com
Mon Oct 13 15:36:27 EDT 2008

#370: Check for use of -X flags on upload
  Reporter:  guest          |        Owner:           
      Type:  defect         |       Status:  new      
  Priority:  normal         |    Milestone:  HackageDB
 Component:  Cabal library  |      Version:  HEAD     
  Severity:  normal         |     Keywords:           
Difficulty:  normal         |   Ghcversion:  6.8.2    
  Platform:                 |  
 We'd like to make it possible to ensure all code on hackage lists
 precisely the -X extensions it uses.

 This kind of thing

      -XEmptyDataDecls -XTypeSynonymInstances -XMultiParamTypeClasses
 -XFlexibleInstances -XRank2Types -XScopedTypeVariables

 Now, these should be listed in both the .cabal file, and in individual
 modules that require the extensions. We can check this by loading the
 modules in ghci.

 The end result: we'd be able to filter on extensions. Researchers would be
 able to see precisely which extensions are used, and in what packages.

 A simple 'is this type correct' script:


 echo "Checking type correctness ... "


 for i in *.hs ; do
      ghci -cpp -Iinclude -v0 $i < /dev/null
 done > $f 2>&1

 if cmp -s $f /dev/null ; then
     echo "Passed"
     echo "Failed"
     cat $f

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

More information about the cabal-devel mailing list