Re: Another CPP gotcha for the manual

2013-11-04 Thread Malcolm Wallace
Of course, cpphs solved this problem nearly a decade ago. Regards, Malcolm On 3 Nov 2013, at 17:57, Mark Lentczner wrote: Turns out that c pre-processing removes C style (/*…*/) comments. Of course, it will do this anywhere in the source. The following program can tell if it is

Re: Another CPP gotcha for the manual

2013-11-04 Thread Daniel Trstenjak
Hi Mark, On Sun, Nov 03, 2013 at 03:01:32PM -0800, Mark Lentczner wrote: This does not appear to be the case, at least any more. The way GHC invokes gcc for c pre-processing only removes /*…*/ style comments, not the later // style: Yes, I can reproduce your behaviour on my system and

Re: Another CPP gotcha for the manual

2013-11-04 Thread Herbert Valerio Riedel
Hello Malcolm, On 2013-11-04 at 10:28:27 +0100, Malcolm Wallace wrote: Of course, cpphs solved this problem nearly a decade ago. Btw, what has been the reason it hasn't been adopted as bundled `cpp` replacement in the GHC distribution in the past? (if it remains a separate executable, its GPL

Re: Another CPP gotcha for the manual

2013-11-04 Thread Malcolm Wallace
AFAIK, it is solely the (L)GPL licence issue. GHC central preferred to use/distribute the GPL'd gcc compiler rather than the GPL'd cpphs preprocessor. (No, it made no sense to me either.) Regards, Malcolm On 4 Nov 2013, at 09:40, Herbert Valerio Riedel wrote: Hello Malcolm, On

Re: Why do we put GMP allocations on GHC heaps?

2013-11-04 Thread Simon Marlow
On 31/10/2013 07:49, Edward Kmett wrote: That actually would be a pretty reasonable way forward, that could maintain the performance of the current approach without crippling GMP for other consumers. It'd probably be a fair bit of work, as you wind up up to your eyeballs in the guts of the

Re: More GND + role inference woes

2013-11-04 Thread Roman Cheplyaka
* Richard Eisenberg e...@cis.upenn.edu [2013-10-16 13:28:54-0400] Moreover, I think this solves the other failures in http://www.haskell.org/pipermail/ghc-devs/2013-October/002961.html. Here is one example, in that email. smallcheck has this: newtype Series m a = Series (ReaderT Depth

Re: More GND + role inference woes

2013-11-04 Thread Richard Eisenberg
Bah. This is a bug. I will fix. Thanks for pointing it out! Richard On Nov 4, 2013, at 10:37 AM, Roman Cheplyaka r...@ro-che.info wrote: * Richard Eisenberg e...@cis.upenn.edu [2013-10-16 13:28:54-0400] Moreover, I think this solves the other failures in

Re: GND and Safe Haskell

2013-11-04 Thread Richard Eisenberg
Roles makes GND completely type-safe. You cannot make unsafeCoerce using GND. However, you can look around abstractions with GND, both before and after roles -- roles weren't really designed to stop you from doing this. See #5498. Whether this is grounds to make GND unSafe is up to the

Re: Another CPP gotcha for the manual

2013-11-04 Thread Carter Schonwald
Maybe we should experiment with it a bit more seriously. With cabal 1.18 it's super easy to tell ghc to call an external program for the cpp pass. And that's our current source of problems. On Monday, November 4, 2013, Malcolm Wallace wrote: AFAIK, it is solely the (L)GPL licence issue. GHC

Re: Another CPP gotcha for the manual

2013-11-04 Thread Carter Schonwald
I mean, that may be the best near term fix for our problems. Does require Haskell platform to ship with cabal 1.18, but maybe that approach would fix all the cpp woes for the near term. ESP since most cpp use is in cabalized projects anyways. On Monday, November 4, 2013, Carter Schonwald wrote:

Re: More GND + role inference woes

2013-11-04 Thread Richard Eisenberg
Bah^2. This is subtler than I thought. See the ticket commentary here: http://ghc.haskell.org/trac/ghc/ticket/8503 Richard On Nov 4, 2013, at 11:02 AM, Richard Eisenberg e...@cis.upenn.edu wrote: Bah. This is a bug. I will fix. Thanks for pointing it out! Richard On Nov 4, 2013, at

Finding assembling class dictionaries from GHC plugins?

2013-11-04 Thread Conal Elliott
I'm working on a GHC plugin (for compiling Haskell to hardware), and I need to synthesize Typeable (and maybe other) class dictionaries for a wide range of types, including composite types (functions, pairs, lists, etc). Can it be done, and how? I think I'm mainly looking for mechanics of finding

Re: Why do we put GMP allocations on GHC heaps?

2013-11-04 Thread Florian Weimer
* Simon Marlow: We did originally look at targetting the mpn API, but decided against it for the reasons alluded to above - the mpz layer has quite a lot of stuff in it that you would need to replicate. For instance, when you start doing an operation some calculation has to be done to figure