
6 Feb
2006
6 Feb
'06
1:41 p.m.
Bulat Ziganshin wrote:
only for the souls interesting in writing efficient programs :)
i included in this letter my own module used for fast variables - "DataVariables.hs". and "wc.hs" contains example of using these vars.
The Var class is interesting - basically the equivalent of the MArray class for mutable variables. Is there a reason you couldn't use the same pattern as the MArray class? MArray of Ptr works fine, but for some reason you couldn't do it with Var, why not? I suggest you follow the same scheme as the unboxed array types, and have IOURef/STURef types, parameterised over the element type. Of course, we should have instances for all of the primitive numeric types plus Ptr, ForeignPtr, StablePtr, Bool. Cheers, Simon