Documentation for implicit parameters

Simon Peyton-Jones simonpj at microsoft.com
Thu Sep 12 03:57:57 EDT 2002


I'll add a note to the user guide; good point.

Let and where are not equivalent and never have been: 

    let is an expression form, and can be nested

    where scopes over guards, and is not an expression form,
	and cannot be nested

Simon

| -----Original Message-----
| From: Alastair Reid [mailto:alastair at reid-consulting-uk.ltd.uk]
| Sent: 11 September 2002 20:45
| To: glasgow-haskell-bugs at haskell.org
| Subject: Documentation for implicit parameters
| 
| 
| We normally expect these forms to be equivalent:
| 
|   let <bindings> in e
| 
|   e where <bindings>
| 
| As I was eliminating uses of with bindings, I found that this was not
| true for implicit parameter bindings.  That is,
| 
|   f x = let ?x = e in e'
| 
| is valid, but
| 
|   f x = e' where ?x = e
| 
| is not.
| 
| I found this while updating old code using s/with/where/.
| 
| 
| It would be good to document this in the user guide.
| (Better yet to restore the equivalence.)
| 
| A
| _______________________________________________
| Glasgow-haskell-bugs mailing list
| Glasgow-haskell-bugs at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



More information about the Glasgow-haskell-bugs mailing list