[Haskell-cafe] How to use STArray?
u.stenzel at web.de
Mon Aug 29 19:57:38 EDT 2005
Benjamin Franksen wrote:
> > append :: (IArray UArray e, MArray (STUArray s) e (ST s)) => ...
I believe there must be an MArray instance for every s for this to work.
If I understand types correctly (which isn't all that certain), the
correct context would be
> > append :: (IArray UArray e, forall s . MArray (STUArray s) e (ST s)) => ...
which is illegal. A workaround might be possible by introducing a new
class which doesn't need to mention s in the context. I can't see the
Uncle Ed's Rule of Thumb:
Never use your thumb for a rule.
You'll either hit it with a hammer or get a splinter in it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20050830/7f137769/attachment.bin
More information about the Haskell-Cafe