[Haskell-cafe] Exception handling when using STUArray

Xiao-Yong Jin xj2106 at columbia.edu
Sat Mar 8 00:29:23 EST 2008


Dear list,

I'm using STUArray in some of my time critical number
crunching code.  I would like to know some way to catch the
exceptions raised in the ST monad, ie. ArrayException.
Looking through the Control.Exception module, I understand
that those functions can only be used within IO monad.  So
my question is, what the best way to do exception handling
in STUArray is.  Plus, it would be helpful if I can also
raise an exception in ST monad, but how?

Thanks,
Xiao-Yong
-- 
    c/*    __o/*
    <\     * (__
    */\      <


More information about the Haskell-Cafe mailing list