[GHC] #10970: Built in MIN_VERSION macro support

GHC ghc-devs at haskell.org
Thu Jan 14 12:23:37 UTC 2016


#10970: Built in MIN_VERSION macro support
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1349
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by rwbarton):

 * status:  closed => new
 * resolution:  fixed =>


Comment:

 I didn't understand Duncan's "ulterior motives" before, but since he just
 mentioned them on IRC, I'm rather sure they are wrong. We should create a
 `MIN_VERSION_*` macro for every ''visible'' package. Cabal builds with
 `-hide-all-packages` anyways, so this is no behavior change compared to
 what's currently implemented when building with Cabal.

 The performance worry seems suspect, too. Besides the fact that Cabal
 builds are still unaffected, the amount of work needed to write out the
 header file can't be large in comparison to the time needed to read the
 package database in the first place. The only non-linear case would be
 using `ghc --make` to build a large number of modules while having a large
 number of packages in the package database, when cpp would have to process
 the header file once for every package. I think this is still unlikely to
 be a big issue compared to ghc actually compiling the modules. I'll try to
 do some timing tests.

 On general principle, it seems bad to unnecessarily create multiple
 "tiers" of visible packages: the visible packages but also the ''really''
 visible packages, that were specified explicitly.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10970#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list