[Hackage] #238: haddock2 is not passed -D__HADDOCK__ or cpp-options
#238: haddock2 is not passed -D__HADDOCK__ or cpp-options ----------------------------------+----------------------------------------- Reporter: ross@soi.city.ac.uk | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.2.3.0 Severity: normal | Keywords: Difficulty: normal | Ghcversion: 6.8.2 Platform: | ----------------------------------+----------------------------------------- With haddock-1, Cabal invokes cpp, passing it ARCH and OS defines, -D__HADDOCK__ and the contents of cpp-options. However haddock-2 invokes cpp itself via the GHC API, which passes this cpp the ARCH and OS defines, but it doesn't get the others. It might also be a good idea to give __HADDOCK__ a numeric value, because GHC extensions need not be hidden from the new one. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/238> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#238: haddock2 is not passed -D__HADDOCK__ or cpp-options ----------------------------------+----------------------------------------- Reporter: ross@soi.city.ac.uk | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ----------------------------------+----------------------------------------- Comment (by duncan): I thought we wanted to avoid using -DHADDOCK precisely because haddock-2.0 can parse everything that ghc can, and so people should not need cpp hacks. Even if we use -DHADDOCK=2 we'll end up seeing the old workaround code that people show to haddock-0.x. We should be passing the cpp-options of course. IMHO, we should still make Cabal do the pre-processing rather than have ghc do it, but that's part of a larger task. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/238#comment:1> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#238: haddock2 is not passed cpp-options ----------------------------------+----------------------------------------- Reporter: ross@soi.city.ac.uk | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ----------------------------------+----------------------------------------- Changes (by ross@soi.city.ac.uk): * summary: haddock2 is not passed -D__HADDOCK__ or cpp-options => haddock2 is not passed cpp-options -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/238#comment:2> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#238: haddock2 is not passed cpp-options ----------------------------------+----------------------------------------- Reporter: ross@soi.city.ac.uk | Owner: Type: defect | Status: closed Priority: normal | Milestone: Component: Cabal library | Version: 1.2.3.0 Severity: normal | Resolution: fixed Keywords: | Difficulty: very easy (<1 hour) Ghcversion: 6.8.2 | Platform: ----------------------------------+----------------------------------------- Changes (by duncan): * status: new => closed * difficulty: normal => very easy (<1 hour) * resolution: => fixed Comment: Fixed ages ago by: {{{ Thu Aug 28 15:23:03 BST 2008 Ian Lynagh <igloo@earth.li> * We need to pass the CPP options to haddock 2 { hunk ./Distribution/Simple/Haddock.hs 355 + ++ ["-optP" ++ opt | opt <- cppOptions bi] } }}} -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/238#comment:3> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
participants (1)
-
Hackage