[GHC] #10970: Built in MIN_VERSION macro support

GHC ghc-devs at haskell.org
Tue Oct 27 17:41:34 UTC 2015


#10970: Built in MIN_VERSION macro support
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       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:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 I think I may have unwittingly argued for this in the discussion on that
 mailing list thread, but I don't understand any more why it should be the
 case that we only create these macros for packages explicitly specified
 with `-package` or equivalent. Can't we treat the latest version of each
 package (or more generally, whichever one ghc(i) would pick by default for
 satisfying an import of one of its modules) as specified, since as I
 learned ghc's choice is not dependent on the contents of the source files?

 In its current form this patch doesn't do a lot to address developer-
 friendliness, since I might have to use a lot of `-package` flags to load
 a source file into ghci.

 Granted there might be other flags (like `-i`, or `-package` to pick
 versions of packages that are different from the ones ghc would pick by
 default) needed to load a source file from a Cabal package into ghci, but
 it seems like we could completely remove `MIN_VERSION_*` macros being a
 source of additional such flags.

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


More information about the ghc-tickets mailing list