[Haskell-cafe] Why this doesn't work?
kai at kzhang.org
Sun Apr 27 08:27:03 UTC 2014
I don't understand why this doesn't work:
import qualified Data.Vector.Generic as G
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...
More information about the Haskell-Cafe