Hi,
I've been thinking a lot lately about heterogeneous and extensible data
structures for which HList certainly offers a solution.
While HList is implemented through type-level programming I wonder if I
can achieve similar results through value-level programming alone.
This is where I was thinking of functional references.
I wonder if or rather how one could do this:
Let's say there was some clever monad ...
someMonad = do
h1 <- add "twenty"
h2 <- add False
h3 <- add 16
.....
modify h2 True
and get a ("twenty",(True, 16)) back. And while *in* the monad some
accessors available.
Now come to think of it I think I actually read about this somewhere so
I doubt this is truly my idea.
Anybody got some thoughts on this?
Günther
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe