[Haskell-cafe] Why this doesn't work?
Kai Zhang
kai at kzhang.org
Sun Apr 27 08:27:03 UTC 2014
Hi Cafe,
I don't understand why this doesn't work:
import qualified Data.Vector.Generic as G
import Control.Monad.ST
test :: G.Vector v a => v a -> v a
test x = runST . (>>= G.freeze) . G.thaw $ x
But if I replace "." with "$", it can compile.
test x = runST $ (>>= G.freeze) . G.thaw $ x
I originally though f $ g x can always be written as f . g $ x
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140427/0e193e7d/attachment.html>
More information about the Haskell-Cafe
mailing list