On 18/01/2011, at 22:18, Johan Tibell wrote:
> The docs for newArray# states:
>
> "Create a new mutable array of specified size (in bytes), in the
> specified state thread, with each element containing the specified
> initial value."
The docs are wrong.
> I'm trying to implement
> the following
Have you tried adding another (dummy) method to the class? GHC used to have
problems with optimising single-method classes in the past.
Roman
On 18 Jan 2011, at 10:33, José Pedro Magalhães wrote:
> Hello all,
>
> I fail to understand the behavior of the inliner in the following example:
>
>
On 18 January 2011 22:18, Johan Tibell wrote:
> Why is the size in bytes?
I think the docs are wrong. The code for newArray# (in PrimOps.cmm)
interprets n as a size in words:
{{{
stg_newArrayzh
{
W_ words, n, init, arr, p, size;
/* Args: R1 = words, R2 = initialisation value */
n =
On Tue, Jan 18, 2011 at 4:18 PM, Johan Tibell wrote:
> Hi,
>
> The docs for newArray# states:
>
> "Create a new mutable array of specified size (in bytes), in the
> specified state thread, with each element containing the specified
> initial value."
>
> Why is the size in bytes? Is Array# meant to
Hi,
The docs for newArray# states:
"Create a new mutable array of specified size (in bytes), in the
specified state thread, with each element containing the specified
initial value."
Why is the size in bytes? Is Array# meant to be used both for boxed
and unboxed values? For arrays of boxed value
Hello all,
I fail to understand the behavior of the inliner in the following example:
module M1 where
>
> class MyEnum a where myEnum :: [a]
>
> instance MyEnum () where myEnum = [()]
>
> module M2 where
>
> import M1
>
> f1 = map (\() -> 'p') [()]
> f2 = map (\() -> 'q') myEnum
>
The generate