Hi all,
I've implemented this: https://phabricator.haskell.org/D1349
Cheers,
Edward
Excerpts from Reid Barton's message of 2015-09-25 15:15:09 -0700:
> On Fri, Sep 25, 2015 at 4:09 PM, Edward Z. Yang wrote:
>
> > Excerpts from Reid Barton's message of 2015-09-25 12:36:48
Cabal defines MIN_VERSION_* macros that allow CPP in a Haskell source file
to get information about the versions of the packages that module is being
compiled against. Unfortunately, these macros are not available when not
compiling with cabal, so packages must either
1. Insist on cabal
think it's
just a matter of adding the logic.
I would love to see the MIN_VERSION macros moved to GHC.
Eric
On Fri, Sep 25, 2015, at 09:06, David Feuer wrote:
> Cabal defines MIN_VERSION_* macros that allow CPP in a Haskell source
> file
> to get information about the versions of the
On 2015-09-25 at 20:48:52 +0200, Richard Eisenberg wrote:
> I've run into this issue, too. Post a feature request! I can't imagine
> it's too hard to implement.
For the current external CPP we'll probably have to create a temporary
file with the definitions (just like cabal does) to -include (as
On Fri, Sep 25, 2015 at 12:18 PM, Eric Seidel wrote:
> I've been meaning to ask about this as well. It also forces tools like
> ghc-mod and hdevtools to be cabal-aware, which is an unnecessary source
> of complexity IMO.
>
This would certainly be nice, but...
GHC certainly has
aware, which is an unnecessary source
> of complexity IMO.
>
> GHC certainly has enough information to generate these macros, as it
> knows which packages (and versions) it's compiling against. I think it's
> just a matter of adding the logic.
>
> I would love to see th
Excerpts from Reid Barton's message of 2015-09-25 12:36:48 -0700:
> It knows at some point, but it doesn't necessarily know before parsing the
> module, at which point it is too late. I can have two versions of a package
> A, and two other packages B and C that depend on different versions of A,
>
On Fri, Sep 25, 2015 at 4:09 PM, Edward Z. Yang wrote:
> Excerpts from Reid Barton's message of 2015-09-25 12:36:48 -0700:
> > GHC could provide MIN_VERSION_* macros for packages that have had their
> > versions specified with -package or similar flags (which is how Cabal
> >