AFAIK Strafunsky lets you thread an arbitrary monad through your
traversal of a datatype, thread the IO monad and use 'Data.Unique' which
provides 'newUnique' that spits out a unique integer.
John
http://haskell.cs.yale.edu/ghc/docs/latest/html/base/Data.Unique.html
On Sat, Dec 07, 2002 at 04:43:57PM -0800, Reto Kramer wrote:
> I'm trying to create a function (using ghc 5.04.2) that returns a
> unique string label each time it's called (unique w.r.t. the program
> run). Using the system timer doesn't cut it (too coarse and hence not
> unique).
>> The challenge is that I'm using Strafunsky to traverse a syntax tree
> and rewrite expression nodes, so I cannot "thread" a counter all
> through this existing library, but need some "side-effecting" store
> that I can update.
>> Any suggestions to such a basic question?
>> - Reto
>> _______________________________________________
> Glasgow-haskell-users mailing list
>Glasgow-haskell-users@haskell.org>http://www.haskell.org/mailman/listinfo/glasgow-haskell-users>
--
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john@foo.net
---------------------------------------------------------------------------