
Thank you to the author and maintainers of cpphs https://hackage.haskell.org/package/cpphs It has tightly-focussed functionality for what I wanted to do: a more haskell-friendly counterpart to cpp. How to get it to behave as I wanted wasn't always obvious. I made some notes https://stackoverflow.com/a/73768057/2840542 Haskell libraries generally use cpp -- and then users complain how awkward it can be. I don't see that cpp does anything better/different vs cpphs -- that is, cpphs understands all the #if compiler_version logic. Then why isn't every library preferring cpphs? AntC

Not everyone wants to be restricted to GPL, for one.
On Mon, Sep 19, 2022 at 9:19 PM Anthony Clayden
Thank you to the author and maintainers of cpphs https://hackage.haskell.org/package/cpphs
It has tightly-focussed functionality for what I wanted to do: a more haskell-friendly counterpart to cpp.
How to get it to behave as I wanted wasn't always obvious. I made some notes https://stackoverflow.com/a/73768057/2840542
Haskell libraries generally use cpp -- and then users complain how awkward it can be. I don't see that cpp does anything better/different vs cpphs -- that is, cpphs understands all the #if compiler_version logic. Then why isn't every library preferring cpphs?
AntC _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com

There are still corporate users who will not touch anything which has
been tainted by GPL/LGPL in any way. So you won't be seeing it used by
e.g. text.
On Tue, Sep 20, 2022 at 4:01 AM Mikolaj Konarski
Not everyone wants to be restricted to GPL, for one.
The license is GNU LGPL, not GNU GPL, so liberating your code is optional, unless you actually copy and paste the code of the library into your code. IANAL though.
-- brandon s allbery kf8nh allbery.b@gmail.com

1. It doesn’t actually get used by Cabal (as of several years): https://github.com/haskell/cabal/issues/4278 2. cabal-install does cross-compilation + preprocessors wrong. By default using ghc as preprocessor works. I think some of the reasons for using cpphs no longer apply (e.g. hugs on windows) Cheers, Vanessa McHale
On Sep 19, 2022, at 9:19 PM, Anthony Clayden
wrote: Thank you to the author and maintainers of cpphs https://hackage.haskell.org/package/cpphs https://hackage.haskell.org/package/cpphs
It has tightly-focussed functionality for what I wanted to do: a more haskell-friendly counterpart to cpp.
How to get it to behave as I wanted wasn't always obvious. I made some notes https://stackoverflow.com/a/73768057/2840542 https://stackoverflow.com/a/73768057/2840542
Haskell libraries generally use cpp -- and then users complain how awkward it can be. I don't see that cpp does anything better/different vs cpphs -- that is, cpphs understands all the #if compiler_version logic. Then why isn't every library preferring cpphs?
AntC _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (4)
-
Anthony Clayden
-
Brandon Allbery
-
Mikolaj Konarski
-
Vanessa McHale