Re: Non-exhaustive pattern match(es) warning in lambda functions

2010-11-17 Thread Mitar
Hi! On Thu, Sep 23, 2010 at 2:19 PM, Christian Maeder christian.mae...@dfki.de wrote: I tend to introduce artificial error cases for the Impossible, to avoid warnings, although the compiler generated error messages are better to locate the problem. But this is often problematic. I was also

RE: Non-exhaustive pattern match(es) warning in lambda functions

2010-11-17 Thread Sittampalam, Ganesh
Mitar wrote: Hi! On Thu, Sep 23, 2010 at 2:19 PM, Christian Maeder christian.mae...@dfki.de wrote: I tend to introduce artificial error cases for the Impossible, to avoid warnings, although the compiler generated error messages are better to locate the problem. But this is often

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-17 Thread Simon Marlow
On 12/11/2010 07:49, Mitar wrote: On Wed, Nov 10, 2010 at 4:48 PM, Simon Marlowmarlo...@gmail.com wrote: You can use maskUninterruptible in GHC 7, but that is not generally recommended, Maybe there should be some function like maskUninterruptibleExceptUser which would mask everything except

Re: Terminate unused worker threads

2010-11-17 Thread Simon Marlow
Hi Edward, Sorry for taking so long to get around to reviewing this one. On 07/11/2010 14:29, Edward Z. Yang wrote: I finally got some spare time to do some GHC hacking, and after feeling my way around http://hackage.haskell.org/trac/ghc/ticket/4262 I came up with the following patch, which

libffi was:Re: ANNOUNCE: GHC version 7.0.1

2010-11-17 Thread Christian Maeder
ghc can be built without and with libffi. What advantage do I gain in the latter case? The packages that come with ghc (displayed by ghc-pkg dump) don't use it. Thanks Christian Am 16.11.2010 13:03, schrieb Christian Maeder:

Re: Terminate unused worker threads

2010-11-17 Thread Edward Z. Yang
Excerpts from Simon Marlow's message of Wed Nov 17 06:15:46 -0500 2010: I suggest keeping track of the number of items in the queue. Ok, I added a spare_workers_no field to the Capability struct. So I think the main thing missing is a call to workerTaskStop(). Added. It would be really nice

Re: libffi was:Re: ANNOUNCE: GHC version 7.0.1

2010-11-17 Thread Tyson Whitehead
On November 17, 2010 09:34:02 Christian Maeder wrote: ghc can be built without and with libffi. What advantage do I gain in the latter case? The packages that come with ghc (displayed by ghc-pkg dump) don't use it. I can't find this right now, but, from when I last looked through the code, I

Re: Terminate unused worker threads

2010-11-17 Thread Ryan Newton
Hi all, Apologies for commenting before understanding Capability.c very well. But it seems that this file uses locking quite heavily. Has there been an analysis of whether atomic memory ops and lock free algorithms could play any role here? Simon mentioned keeping track of the number of items

Re: Terminate unused worker threads

2010-11-17 Thread Edward Z. Yang
Hello Ryan, Adding the extra spare_workers_no field bookkeeping doesn't add very much overhead, since whenever spare_worker's is changing we already have taken out the lock. As for using a lock-free data structures, I can't say I have a good feel for how performance might change in that case.

Using the GHC API: pretty printing with qualified names

2010-11-17 Thread JP Moresmau
Hello, I'm the maintainer for EclipseFP, which involves using the scion library and the GHC API to provide IDE functionality. I have a little issue that no doubt stems from me not understanding the GHC API well, and I would be grateful for any light on the matter. I'm trying to give the user the

Re: Using the GHC API: pretty printing with qualified names

2010-11-17 Thread Thomas Schilling
On 17 November 2010 19:21, JP Moresmau jpmores...@gmail.com wrote: Hello, I'm the maintainer for EclipseFP, which involves using the scion library and the GHC API to provide IDE functionality. I have a little issue that no doubt stems from me not understanding the GHC API well, and I would be

Re: Using the GHC API: pretty printing with qualified names

2010-11-17 Thread JP Moresmau
On Wed, Nov 17, 2010 at 9:21 PM, Thomas Schilling nomin...@googlemail.comwrote: On 17 November 2010 19:21, JP Moresmau jpmores...@gmail.com wrote: Hello, I'm the maintainer for EclipseFP, which involves using the scion library and the GHC API to provide IDE functionality. I have a little

RE: Using the GHC API: pretty printing with qualified names

2010-11-17 Thread Simon Peyton-Jones
I'm trying to give the user the possibility to jump to the definition of a symbol in the source file. You click on the name of a function and you're send to the module where it's defined. So I have an AST, and somewhere down the line I have an Id object representing that function call. Then I

Re: Using the GHC API: pretty printing with qualified names

2010-11-17 Thread Claus Reinke
Hello, I'm the maintainer for EclipseFP, which involves using the scion library and the GHC API to provide IDE functionality. I have a little issue that no doubt stems from me not understanding the GHC API well, and I would be grateful for any light on the matter. A meta-comment: the GHC API

Re: Using the GHC API: pretty printing with qualified names

2010-11-17 Thread scooter . phd
Claus: scion-server mimics a GHCi command line, of sorts. scion-server is used very successfully to syntax-highlight the Eclipse editor, show a source's outline, provide type information when hovering over a name, and provide completions. That's not the problem, per se. Let's say I'm hovering