At 2002-02-06 00:33, Koen Claessen wrote:
Hm... this looks nice. With slight name changes this becomes:
Oh if you must. I decided that Refs were _so_ fundamental that anytime you get, set or modify anything it could probably be represented as a Ref, so the functions merit highly generic names. And 'read' and 'write' are for streams IMO.
Not really, the m -> r is still there in practise, since you want to be able to use the 'readRef' and 'writeRef' operators, which work on the monad m, and you want them to work on the monad (t m).
So how is that an m -> r dependency? Nothing is stopping the programmer have two different kinds of reference for the same monad, and 'readRef' and 'writeRef' will work on any Ref. -- Ashley Yakeley, Seattle WA
Ashley Yakeley wrote: | So how is that an m -> r dependency? Nothing is | stopping the programmer have two different kinds of | reference for the same monad, and 'readRef' and | 'writeRef' will work on any Ref. You are completely right, of course I meant r -> m! /Koen. -- Koen Claessen http://www.cs.chalmers.se/~koen Chalmers University, Gothenburg, Sweden.
participants (2)
-
Ashley Yakeley -
Koen Claessen