[Haskell-cafe] Unique monad?

ajb at spamcop.net ajb at spamcop.net
Mon Mar 30 23:42:53 EDT 2009

G'day all.

Quoting Lennart Augustsson <lennart at augustsson.net>:

> I think Data.Unique is horrible and should be banned.
> It encourages a global variable style of programming that will just
> bite you in the end.

In the sense that it doesn't give you anything that Monad.Supply
or Control.Comonad.Supply doesn't, I agree.

However, Data.Unique is a building block for the grubby implementation
details of prettier, higher-level data structures (e.g. data structures
that use hash consing).  It's not supposed to be used at the application
level.  In that sense, it's no worse than unsafePerformIO.

Andrew Bromage

More information about the Haskell-Cafe mailing list