[Haskell-cafe] Composing functions with runST

David House dmhouse at gmail.com
Wed Jan 3 11:46:17 EST 2007


On 03/01/07, Seth Gordon <sethg at ropine.com> wrote:
> So I can't just tell someone who's just starting to learn Haskell that
> "f $ g y" is equivalent to "f (g y)"; I have to say "those two are
> *almost always* equivalent, but if you use $ and the compiler complains
> about not being able to match the expected and the inferred type and a
> type signature in the error message has the word 'forall', try rewriting
> that expression without the $ and see if it compiles".  Eeeww.

Why would someone just starting to learn Haskell be using ST? The
canonical tutorial structure is to start with the pure stuff and only
introduce the (more complicated!) impure stuff (ST, IORefs, etc.) in
an 'advanced techniques' or similar section.

-- 
-David House, dmhouse at gmail.com


More information about the Haskell-Cafe mailing list