[Haskell-cafe] Re: (a -> [b]) vs. [a -> b]

Tomasz Zielonka tomasz.zielonka at gmail.com
Sat Feb 3 07:25:47 EST 2007


On Sat, Feb 03, 2007 at 10:13:17AM +0100, apfelmus at quantentunnel.de wrote:
> Chad Scherrer wrote:
> > So in reality, I'm trying to construct something like
> > f :: (a -> STM b) -> STM (a -> b)
> 
> Indeed, such an f most likely does not exist.

Yes, consider:
    f readTVar :: STM (TVar c -> c)
That would be pretty dangerous.

Best regards
Tomasz


More information about the Haskell-Cafe mailing list