Re: Boxed foreign prim

2012-03-13 Thread Edward Kmett
On Tue, Mar 13, 2012 at 4:57 AM, Simon Marlow wrote: > On 12/03/2012 14:22, Edward Kmett wrote: > >> On Mon, Mar 12, 2012 at 6:45 AM, Simon Marlow > > wrote: >>But I can only pass unboxed types to foreign prim. >> >>Is this an intrinsic limitation or jus

Re: Boxed foreign prim

2012-03-13 Thread Simon Marlow
On 12/03/2012 14:22, Edward Kmett wrote: On Mon, Mar 12, 2012 at 6:45 AM, Simon Marlow mailto:marlo...@gmail.com>> wrote: But I can only pass unboxed types to foreign prim. Is this an intrinsic limitation or just an artifact of the use cases that have presented themselve

Re: Boxed foreign prim

2012-03-12 Thread Edward Kmett
On Mon, Mar 12, 2012 at 6:45 AM, Simon Marlow wrote: > But I can only pass unboxed types to foreign prim. >> >> Is this an intrinsic limitation or just an artifact of the use cases >> that have presented themselves to date? >> > > It's an intrinsic limitation - the I# box is handled entirely at t

Re: Boxed foreign prim

2012-03-12 Thread Simon Marlow
On 09/03/2012 04:12, Edward Kmett wrote: I'm currently working with a lot of very short arrays of fixed length and as a thought experiment I thought I would try to play with fast numeric field accessors In particular, I'd like to use something like foreign prim to do something like > foreign i

Re: Boxed foreign prim

2012-03-08 Thread Joachim Breitner
Hi, Am Donnerstag, den 08.03.2012, 23:12 -0500 schrieb Edward Kmett: > But I can only pass unboxed types to foreign prim. > > Is this an intrinsic limitation or just an artifact of the use cases > that have presented themselves to date? funny, I just stumbled over this two days ago as well. In

Re: Boxed foreign prim

2012-03-08 Thread Johan Tibell
On Thu, Mar 8, 2012 at 8:12 PM, Edward Kmett wrote: > I'm currently working with a lot of very short arrays of fixed length and as > a thought experiment I thought I would try to play with fast numeric field > accessors > > ... > > This becomes more reasonable to consider when you are forced to ma

Boxed foreign prim

2012-03-08 Thread Edward Kmett
I'm currently working with a lot of very short arrays of fixed length and as a thought experiment I thought I would try to play with fast numeric field accessors In particular, I'd like to use something like foreign prim to do something like > foreign import prim "cmm_getField" unsafeField# :: a