Adde wrote:
tmp <- foo
return Bar {
barFoo = tmp
}
There is a feature being worked on in GHC HEAD that would let you do
do
tmp <- foo
return Bar{..}
which captures fields from everything of the same name that's in scope.
I think this would also satisfy your desire.
(also, the liftM approach doesn't let you choose the order of the
monadic actions.)
Isaac
_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime