Syntax for implicit parameters

Simon Peyton-Jones simonpj@microsoft.com
Mon, 30 Apr 2001 05:22:13 -0700


Erik Meijer, John Launchbury and I discussed the syntax of implicit
parameters at WG2.8 last week.

We emerged with agreement on the following: instead of 'with' use

	let dynamic
		?x =3D 3
		?y =3D ?y+?x
	in =09
	...

* 'dynamic' is a special-id, only significant immediately following
  a let.

* The bindings are non-recursive, and nested top to bottom


Reasons:

- All other Haskell constructs are prefix form, and extend as far
  to the right as possible: let, case, lambda.  Using the same
convention
  eliminates the question of what=20
	let x =3D 4 in E with ?y =3D 4
  might mean

  The exception to prefix form is 'where' but it scopes over groups=20
  of right-hand sides, not expressions

- We wanted a clear clue that this is not a standard-Haskell recursive
let
 =20

- We didn't want to take an extra keyword.


I (very much) hope this is acceptable to everyone.  It's not worth
a major use of brain cells, but it would be great to make GHC and
Hugs agree.

Simon

PS: I recall that Alastair volunteered to make the change to Hugs.