[Haskell-beginners] where scope

I. J. Kennedy jack at realmode.com
Mon Jul 20 01:29:06 EDT 2009


GHC complains that  u  is out of scope in the following definition:

f n =
  let u = [1..n] in g n
  where
    g x = u

Why?  I understand that it's "just the way Haskell works", but I'm
wondering about the rationale of the language designers when deciding
on this scoping behavior.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20090720/523710cb/attachment.html


More information about the Beginners mailing list