I\'d appreciate if someone could point to docs on what "let" does in GHCi, or failing that, explain it convincingly.
So far as I can tell, "let" (
GHCI commands are executed in the IO monad and uses do syntax, so the desugaring rules apply. From Real World Haskell
doNotation4 =
do let val1 = expr1
val2 = expr2
{- ... etc. -}
valN = exprN
act1
act2
{- ... etc. -}
actN
translates to:
translated4 =
let val1 = expr1
val2 = expr2
{- ... etc. -}
valN = exprN
in do act1
act2
{- ... etc. -}
actN