Typesafe MRef with a regular monad
Koen Claessen
koen@cs.chalmers.se
Wed, 11 Jun 2003 09:19:46 +0200 (MET DST)
Derek Elkins wrote:
| The question (at least to me) is more, 'you can
| satisfy the RefMonad interface with STRefs or IORefs,
| but those use "imperative" features under the hood;
| can it be satisfied without them?'
As I showed in the message that spawned off this discussion,
this is indeed possible to do (unless you think any monad by
itself is an imperative thing). The only thing one needs to
focus on is the typing and not the imperativeness.
/Koen.
--
Koen Claessen
http://www.cs.chalmers.se/~koen
Chalmers University, Gothenburg, Sweden.