Giving function a larger arity

2013-11-11 Thread Akio Takano
Hi, I've been trying to get a certain type of programs compiled into efficient code, but I haven't been able to find a good way to do it, so I'm asking for help. Specifically, it involves a library that defines a newtype whose representation is a function. Attached Lib.hs is an example of such a

RE: Giving function a larger arity

2013-11-11 Thread Simon Peyton-Jones
Strangely enough I've been thinking about eta expansion in the last day or two. It's one of GHC's more delicate corners, because 1. There can be big performance boosts 2. If you push a redex inside a lambda But as you point out (2) may be arbitrarily bad unless you know the lambda

Re: blocking parallel program

2013-11-11 Thread Facundo Domínguez
In case anyone wants to contribute to it, I have submitted a bug report [1]. Best, Facundo [1] https://ghc.haskell.org/trac/ghc/ticket/8521 On Mon, Oct 21, 2013 at 9:03 AM, Facundo Domínguez facundo.doming...@parsci.com wrote: Oh I see; the problem is the GHC RTS is attempting to shut down,

RE: Giving function a larger arity

2013-11-11 Thread John Lato
Originally I thought Plan B would make more sense, but if Plan A were implemented could this one-shot type annotation be unified with the state hack? I'm envisioning something like RULES, where if the type matches ghc knows it's a one-shot lambda. I think it would be better to not do any analysis