[Haskell-cafe] Refactoring from State monad to ST monad, for STUArray

Denis Bueno dbueno at gmail.com
Sat Feb 2 20:37:14 EST 2008


On Feb 2, 2008 5:58 PM, Daniel Fischer <daniel.is.fischer at web.de> wrote:
> Obviously not.
> Try
> solve rnd cnf = runST $ do
>         solution <- evalStateT ...
>         case solution of
>            Nothing -> return Unsat
>            Just ar -> unsafeFreeze ar
>

Ah, right.  Thanks.  This worked.

-- 
                              Denis


More information about the Haskell-Cafe mailing list