RFC: Syntax for implicit parameter bindings

Ashley Yakeley ashley@semantic.org
Sun, 3 Feb 2002 16:23:49 -0800


At 2002-02-03 15:34, Manuel M. T. Chakravarty wrote:

>  The main disadvantage of this solution is that, in
>  Haskell, some keywords (`let', `case', `where', and `do')
>  trigger the layout rule and now `dynamic' or `nonrec'
>  would have to trigger the layout rule, but *only* when
>  appearing after a `let'. *urgh*

Am I the only one who uses braces/semicolons? Anyway, I would be using 
this under [Just use let]:

    let
        {
        ?base = 10;
        }
     in addBase 5

If I read you correctly, under [Add a special identifier], I'd have to do 
this:

    let
        {
        nonrec
            {
            ?base = 10;
            }
        }
     in addBase 5

...which is just ugly.

>[Use a special binding operator]

My preference, with ':='. But yes, it does mean some code will have to be 
rewritten. Not mine.

>There was also a mention of extending the implicit parameter
>story to work as recursive bindings, but I don't know any
>details here.

Even if this happens, we can still hold onto := for explicit value 
bindings, if that's a useful feature.


-- 
Ashley Yakeley, Seattle WA
Never trust whitespace.