id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
4902	Create a primop for getting the size of an Array#	tibbe		"We currently store the size of `Array#`s (and `MutableArray#`s):

{{{
typedef struct {
    StgHeader   header;
    StgWord     ptrs;
    StgWord     size; // ptrs plus card table
    StgClosure *payload[FLEXIBLE_ARRAY];
    // see also: StgMutArrPtrs macros in ClosureMacros.h
} StgMutArrPtrs;
}}}

However, there's currently no way to read this information. This means that array types defined in terms of the two primitive array types need to store this size, even though it's already stored by GHC.

I think we should expose `sizeOfArray#` and `sizeOfMutableArray#`.
"	feature request	closed	normal		Runtime System	7.0.1	fixed		pumpkingod@… johan.tibell@…	Unknown/Multiple	Unknown/Multiple	None/Unknown					
