[Hackage] #155: show . readPackageDescription /= id

Hackage trac at galois.com
Sun Sep 16 14:27:40 EDT 2007

#155: show . readPackageDescription /= id
  Reporter:  kolmodin at dtek.chalmers.se  |        Owner:  nominolo
      Type:  defect                     |       Status:  new     
  Priority:  normal                     |    Milestone:          
 Component:  Cabal                      |      Version:  HEAD    
  Severity:  normal                     |     Keywords:          
Difficulty:  normal                     |   Ghcversion:  6.6     
  Platform:  Linux                      |  

 if find the following a bit confusing:

 Read and then print a cabal file (old style without configurations is
 pkg <- readPackageDescription normal "foo.cabal" -- :: IO
 print pkg

 That output is then not parsable by readPackageDescription, error:
 Test.hs: foo-copy.cabal26: Parse of field 'executable' failed:

 It seems that the Show instance of GenericPackageDescription generates a
 string where the executables' entries cannot be parsed again.

   Lennart K

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/155>
Hackage <http://example.com/>
My example project

More information about the cabal-devel mailing list