I noticed that I can return to database compatibility by adding a CPP condition as follows:
moo :: Moo
moo = Moo
{ happyMoo = Sound "moo"
, upgradedMoo = Sound "moo"
, sadMoo = Sound "moo"
}
But I get an error when defining dependencies at the package level (i.e. using something like #if MIN_VERSION_optparse-applicative(0,13,0)
), and it's hard for me to find documentation for this GHC function.
I am wondering if something like exists MIN_VERSION_optparse-applicative
, and if not, how do the supporting hackage keep the code backward compatible?
source
share