On Thursday 10 March 2011 17:15:29, Bas van Dijk wrote:
> On 10 March 2011 14:47, Daniel Fischer <daniel.is.fisc...@googlemail.com> 
wrote:
> > If memory serves correctly, it's impredicative polymorphism.
> 
> Indeed. For example the following also doesn't type check in GHC-7:
> 
> foo :: (forall s. ST s a) -> a
> foo st = ($) runST st
> 
> Surprisingly the following does:
> 
> foo :: (forall s. ST s a) -> a
> foo st = runST $ st
> 
> Because GHC contains a special rule for infix $. Also see:
> 
> http://article.gmane.org/gmane.comp.lang.haskell.glasgow.user/19152
> 
> Bas

Bedankt. I sort of knew there was a special case for ($) because
runST $ do ...
works, but not exactly what was handled.
So until I forget, I now know it's infix ($) and only that.

Cheers,
Daniel

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to