On Mon, 13 Sep 2010, Alexander Kotelnikov wrote:
Hello.
http://www.haskell.org/onlinereport/exps.html#sect3.14 a obscure (to me) note
which says
"As indicated by the translation of do, variables bound by let have fully polymorphic
types while those defined by <- are lambda bound and are thus monomorphic."
What actually does it mean?
It means that variables bound by let, may be instantiated to different
types later.
And, also, would it make any difference if
do {p <- e; stmts} = let ok p = do {stmts}
ok _ = fail "..."
in e >>= ok
is redefined as "e >>= (\p -> do {stmts})"?
It would not make a difference because the (>>=)-expression is what the
do-expression is expanded to.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe