Re: [Haskell-cafe] RFC: Native -XCPP Proposal

2015-05-11 Thread Daniel Trstenjak
Hi Wren, Incidentally, if we really want to pursue the get rid of CPP by building it into the GHC distro... In recent years there've been a number of papers on variational lambda-calculi[1] which essentially serve to embed flag-based preprocessor conditionals directly into the language

Re: [Haskell-cafe] RFC: Native -XCPP Proposal

2015-05-09 Thread Brandon Allbery
On Fri, May 8, 2015 at 7:56 PM, Brandon Allbery allber...@gmail.com wrote: On Fri, May 8, 2015 at 7:40 PM, Donn Cave d...@avvanta.com wrote: But fatal if compilation is conditional on something that affects the ability to type check, am I right? Such as different compilers or versions of

Re: [Haskell-cafe] RFC: Native -XCPP Proposal

2015-05-08 Thread Malcolm Wallace
Exactly. My post was an attempt to elicit response from anyone to whom it matters. There is no point in worrying about hypothetical licensing problems - let's hear about the real ones. Regards, Malcolm On 7 May 2015, at 22:15, Tomas Carnecky wrote: That doesn't mean those people don't

Re: [Haskell-cafe] RFC: Native -XCPP Proposal

2015-05-08 Thread Malcolm Wallace
On 8 May 2015, at 00:06, Richard A. O'Keefe wrote: I think it's important that there be *one* cpp used by Haskell. fpp is under 4 kSLOC of C, and surely Haskell can do a lot better. FWIW, cpphs is about 1600 LoC today. Regards, Malcolm ___

Re: [Haskell-cafe] RFC: Native -XCPP Proposal

2015-05-08 Thread Christian Maeder
Hi, using cpphs is the right way to go! Rewriting it from scratch may be a good exercise but is (essentially) a waste of time. However, always asking Malcolm to get source changes into cpphs would be annoying. Therefore it would be great if the sources were just part of the ghc sources (under

Re: [Haskell-cafe] RFC: Native -XCPP Proposal

2015-05-08 Thread Mathieu Boespflug
[Gah, wrong From: email address given the list subscriptions, sorry for the duplicates.] I'm unclear why cpphs needs to be made a dependency of the GHC API and included as a lib. Could you elaborate? (in the wiki page possibly) Currently, GHC uses the system preprocessor, as a separate process.

Re: [Haskell-cafe] RFC: Native -XCPP Proposal

2015-05-08 Thread Dan Doel
vector generates a considerable amount of code using CPP macros. And with regard to other mails, I'm not too eager (personally) to port that to template Haskell, even though I'm no fan of CPP. The code generation being done is so dumb that CPP is pretty much perfect for it, and TH would probably

Re: [Haskell-cafe] RFC: Native -XCPP Proposal

2015-05-08 Thread wren romano
On Fri, May 8, 2015 at 12:12 PM, Dan Doel dan.d...@gmail.com wrote: vector generates a considerable amount of code using CPP macros. And with regard to other mails, I'm not too eager (personally) to port that to template Haskell, even though I'm no fan of CPP. The code generation being done

Re: [Haskell-cafe] RFC: Native -XCPP Proposal

2015-05-08 Thread Brandon Allbery
On Fri, May 8, 2015 at 7:40 PM, Donn Cave d...@avvanta.com wrote: But fatal if compilation is conditional on something that affects the ability to type check, am I right? Such as different compilers or versions of same compiler. Not per the abstract (paper itself seems to be paywalled).

Re: [Haskell-cafe] RFC: Native -XCPP Proposal

2015-05-07 Thread wren romano
On Wed, May 6, 2015 at 9:05 AM, Alan Kim Zimmerman alan.z...@gmail.com wrote: Perhaps it makes sense to scan hackage to find all the different CPP idioms that are actually used in Haskell code, if it is a small/well-defined set it may be worth writing a simple custom preprocessor. Conditional

Re: [Haskell-cafe] RFC: Native -XCPP Proposal

2015-05-06 Thread Sven Panne
2015-05-06 16:21 GMT+02:00 Bardur Arantsson s...@scientician.net: +1, I'll wager that the vast majority of usages are just for version range checks. The OpenGL-related packages used macros to generate some binding magic (a foreign import plus some helper functions for each API entry), not just

Re: [Haskell-cafe] RFC: Native -XCPP Proposal

2015-05-06 Thread Brandon Allbery
On Wed, May 6, 2015 at 10:59 AM, Bardur Arantsson s...@scientician.net wrote: (I'm not going to be doing any of the work, so this is just armchairing, but this seems like an 80/20 solution would be warranted.) Only if you're convinced it will remain 80/20 for the foreseeable future. I do not