Re: What are the preconditions of newArray#

2011-08-22 Thread Johan Tibell
I agree (unless it has a performance cost). I had to fix a couple of bugs in my code associated with generating zero-length arrays. On Mon, Aug 22, 2011 at 5:54 PM, Edward Kmett wrote: > It would still be nice to have a consistent base case. > > On Mon, Aug 22, 2011 at 3:43 AM, Johan Tibell > wr

Re: What are the preconditions of newArray#

2011-08-22 Thread Edward Kmett
It would still be nice to have a consistent base case. On Mon, Aug 22, 2011 at 3:43 AM, Johan Tibell wrote: > On Mon, Aug 22, 2011 at 5:55 AM, Edward Z. Yang wrote: > > stg_newArrayzh in rts/PrimOps.cmm doesn't appear to give any indication, > > so this might be a good patch to add. But I'm cur

Re: Cheap and cheerful partial evaluation

2011-08-22 Thread Edward Z. Yang
I think this ticket sums it up very nicely! Cheers, Edward Excerpts from Max Bolingbroke's message of Mon Aug 22 04:07:59 -0400 2011: > On 21 August 2011 19:20, Edward Z. Yang wrote: > > And no sooner do I send this email do I realize we have 'inline' built-in, > > so I can probably experiment w

RE: Superclass defaults

2011-08-22 Thread Simon Peyton-Jones
| > I don't completely understant how does it work. Does client need to enable | > language extension to get default instances? | | I think that the extension would only be required to *define them*, | not for them to be generated. The more conservative choice would | indeed be to require the exte

Re: Cheap and cheerful partial evaluation

2011-08-22 Thread Max Bolingbroke
On 21 August 2011 19:20, Edward Z. Yang wrote: > And no sooner do I send this email do I realize we have 'inline' built-in, > so I can probably experiment with this right now... You may be interested in my related ticket #5029: http://hackage.haskell.org/trac/ghc/ticket/5059 I don't think this i

Re: Superclass defaults

2011-08-22 Thread Max Bolingbroke
On 21 August 2011 21:03, Alexey Khudyakov wrote: > I don't completely understant how does it work. Does client need to enable > language extension to get default instances? I think that the extension would only be required to *define them*, not for them to be generated. The more conservative choi

Re: What are the preconditions of newArray#

2011-08-22 Thread Johan Tibell
On Mon, Aug 22, 2011 at 5:55 AM, Edward Z. Yang wrote: > stg_newArrayzh in rts/PrimOps.cmm doesn't appear to give any indication, > so this might be a good patch to add.  But I'm curious: what would > allocating Array#s of size 0 do? Null pointers? That sounds dangerous... I would imagine that a