RE: Syntax for implicit parameters

2001-04-27 Thread Simon Marlow

 [Incidentally, if I did control Hugs, I wouldn't make the suggested
 change to dlet/with at this point.  Marcin says I have no deep
 reasons ... Hmm, I don't know about deep, but I do have reasons
 for this, both technical and pragmatic.  But I'm not going to go into
 detail because I don't think it will serve any useful purpose, and
 because, if I'm going to let go, then I really do have to let go ...]

Mark - I think the reason that you're being asked to comment on this
discussion is because we'd like to know what these reasons are!  It
would be a pity if us implementors made a unilateral decision on syntax
that ended up being misguided.

Cheers,
Simon

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



RE: Syntax for implicit parameters

2001-04-26 Thread Mark P Jones

| Marcin Kowalczyk ([EMAIL PROTECTED]) writes:
|  I would like to replace with and dlet with let. But SimonPJ
|  said he won't do it in ghc unless Hugs does it too, and Mark P Jones
|  said he won't do it in Hugs now (without deep reasons: no
|  people/hours to do that, and no plans to release next Hugs version
|  this year).
| 
| I'd really, really like to see a fresh release of Hugs ...

Noticing that Alastair listed my email address in his message, and
that Marcin called me by name in his comments above, I think it's
time for a gentle reminder: I don't work on Hugs any more!

In fact, as I announced at the time, I stopped working on Hugs in
January 2000.  After working on it for almost a decade, I figured
that it was time for me to move on.  That decision was not easy,
in part because of the time and energy that I have invested in
its development; because of the pleasure that your success stories
bring; and because of the dissappointment that I feel when I hear
from people who are frustrated by its limitations and weaknesses.
I am astonished, quite frankly, that Hugs is still in widespread
use today.  I never expected it to last this long, or to have come
along quite so far.  And yet, of course, it is still lacking in many
ways.  But the system has acquired a life of its own, and no longer
reflects my views, needs, or efforts as it once did.

I still retain an interest in Haskell, and (for now at least)
I continue to read (and sometimes reply to) messages on the Hugs
mailing lists.  And I do talk to Johan quite frequently about Hugs;
after all, his office is just a few doors away from mine.  (Johan
is the current maintainer of Hugs, although I sometimes think people
don't realize that it's only a small part of his work, and not a
full-time activity.)  I don't/won't/can't control Hugs as Marcin
suggests so it's not up to me to decide whether a change gets made
... nor am I the one that will make any changes.

[Incidentally, if I did control Hugs, I wouldn't make the suggested
change to dlet/with at this point.  Marcin says I have no deep
reasons ... Hmm, I don't know about deep, but I do have reasons
for this, both technical and pragmatic.  But I'm not going to go into
detail because I don't think it will serve any useful purpose, and
because, if I'm going to let go, then I really do have to let go ...]

Please do with Hugs as you all see fit!  Its future is in your hands
now, not mine!  I hope you'll all have fun with it!

All the best,
Mark


___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



RE: [repeat post] Re: Syntax for implicit parameters

2001-04-23 Thread Alastair Reid

 Surely we could use *zero* extra identifiers by writing:
 
   (ia)  let ?x = foo in bar
   (iia) bar where ?x = foo
 
 i.e., s/dlet/let/ and s/with/where/ .
 
 I thought this was mentioned at the Haskell Implementors' Meeting.

I believe that is the favoured change amongst those that want change.

I've recently come across a new twist in the story though:

o let and where have a letrec semantics.  That is:

let x = 1 in (let x=x in x)

  is an infinite loop because it can be alpha renamed to:

let x = 1 in (let y=y in y)

o with and dlet have a non-recursive let semantics.  That is:

dlet ?x=1 in (dlet ?x=?x in ?x)

  has the value 1 because it can be renamed to:

dlet ?x=1 in (dlet ?y=?x in ?y)

The problem is that if they have the same syntax, then they probably
ought to have the same semantics wrt recursive/non-recursive bindings.

The semantics of dlet/with is entirely intentional on the part of the
 designers of implicit parameters.  For example, if you use implicit
 parameters in an interpreter, you can use code like this to extend
 the environment when processing a let expression:

  eval (Let v e1 e2) = eval e2 with ?env = (v, eval e1) : ?env

(The IP paper has a different example based on pretty-printers but
I happen to find this one more compelling since I write code like
this all the time.)

--
Alastair

ps I don't happen to agree with the IP designers but I hope I understand
   their argument well enough to have given a fair example of why
   a non-recursive dlet/with is desirable.  Apologies if not.




___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



RE: [repeat post] Re: Syntax for implicit parameters

2001-04-23 Thread Alastair Reid

I wrote:
   eval (Let v e1 e2) = eval e2 with ?env = (v, eval e1) : ?env

[Blush] Andy Gill pointed out that this example was ambiguous because
 it wasn't clear if I wanted this Let to be recursive or non-recursive.

My intention was that this was a non-recursive let.

--
Alastair Reid

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: Syntax for implicit parameters

2001-04-21 Thread Sven Panne

Simon Peyton-Jones wrote:
 [...]
 1. [happy]. Use 'let'
 2. [consent].  Use 'dlet' or 'with'
 3. [hate]  Use both 'dlet' and 'with'
 
 Would the Hugs folk be willing to adopt (2)?

I'm getting a little bit lost in this thread: Everybody seems to
agree that stealing identifiers is bad, stealing a *very* useful
identifier ('with') is *very* bad, and Alastair promised to synch
Hugs with GHC, so why don't we adopt (1)?

Confused,
   Sven

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: Syntax for implicit parameters

2001-04-20 Thread Jeffrey R. Lewis

Simon Peyton-Jones wrote:

 I only added 'with' because I did not want to steal *two* new keywords.
 One is bad enough!   I proposed using 'let' (not dlet), with the '?' to
 distinguish dynamic from lexical bindings, but did not achieve
 consensus.


I only added `with' to GHC originally because `dlet' was essentially deprecated 
(although I never bothered to remove it from hugs).


 Lack of consensus = the status quo stays.

 My order of preference:

 1. [happy]. Use 'let'
 2. [consent].  Use 'dlet' or 'with'
 3. [hate]  Use both 'dlet' and 'with'

 Would the Hugs folk be willing to adopt (2)?

That would certainly be fine by me.

--Jeff


___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: Syntax for implicit parameters

2001-04-20 Thread Jeffrey R. Lewis

"Manuel M. T. Chakravarty" wrote:

 "Jeffrey R. Lewis" [EMAIL PROTECTED] wrote,

   Lack of consensus = the status quo stays.
  
   My order of preference:
  
   1. [happy]. Use 'let'
   2. [consent].  Use 'dlet' or 'with'
   3. [hate]  Use both 'dlet' and 'with'
  
   Would the Hugs folk be willing to adopt (2)?
 
  That would certainly be fine by me.

 What exactly does (2) imply?  Does it mean we get `with'
 back or not?

I'm afraid I misspoke.  I meant (2) with `with'.  Sorry ;-)  I'm happy to nuke `dlet'.

--Jeff


___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: Syntax for implicit parameters

2001-04-20 Thread Manuel M. T. Chakravarty

"Jeffrey R. Lewis" [EMAIL PROTECTED] wrote,

 "Manuel M. T. Chakravarty" wrote:
 
  "Jeffrey R. Lewis" [EMAIL PROTECTED] wrote,
 
Lack of consensus = the status quo stays.
   
My order of preference:
   
1. [happy]. Use 'let'
2. [consent].  Use 'dlet' or 'with'
3. [hate]  Use both 'dlet' and 'with'
   
Would the Hugs folk be willing to adopt (2)?
  
   That would certainly be fine by me.
 
  What exactly does (2) imply?  Does it mean we get `with'
  back or not?
 
 I'm afraid I misspoke.  I meant (2) with `with'.  Sorry ;-)  I'm happy to nuke 
`dlet'.

The problem is that implict parameters than clash with both
the HaXML and the new FFI libraries, ie, you can't use both
in a module.  Not nice.

Manuel

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: Syntax for implicit parameters

2001-04-20 Thread Manuel M. T. Chakravarty

Jeffrey R. Lewis [EMAIL PROTECTED] wrote,

  Lack of consensus = the status quo stays.
 
  My order of preference:
 
  1. [happy]. Use 'let'
  2. [consent].  Use 'dlet' or 'with'
  3. [hate]  Use both 'dlet' and 'with'
 
  Would the Hugs folk be willing to adopt (2)?
 
 That would certainly be fine by me.

What exactly does (2) imply?  Does it mean we get `with'
back or not?

Manuel

___
Hugs-Bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/hugs-bugs



RE: Syntax for implicit parameters

2001-04-19 Thread Simon Peyton-Jones

I only added 'with' because I did not want to steal *two* new keywords.
One is bad enough!   I proposed using 'let' (not dlet), with the '?' to
distinguish dynamic from lexical bindings, but did not achieve
consensus.

Lack of consensus = the status quo stays.  

My order of preference:

1. [happy]. Use 'let'
2. [consent].  Use 'dlet' or 'with'
3. [hate]  Use both 'dlet' and 'with'

Would the Hugs folk be willing to adopt (2)?

Simon

| -Original Message-
| From: Alastair Reid [mailto:[EMAIL PROTECTED]]
| Sent: 18 April 2001 18:31
| To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
| Subject: Syntax for implicit parameters
| 
| 
| 
| Some months ago, there was talk about making sure GHC and Hugs use the
| same syntax for implicit parameters and (most importantly) that that
| syntax should not introduce the keyword "with".
| 
| As far as I can see (from looking at both parsers and trying
| examples), this discussion has not been acted on.  Hugs seems to
| allow:
| 
|   dlet ?x = 'a' in ?x + 1
|   ?x + 1 with ?x = 'a'
| 
| and GHC 5.0 only seems to support:
| 
|   ?x + 1 with ?x = 'a'
| 
| Can the GHC people, the Hugs people and the implicit parameter
| designers come to some sort of agreement and implement the result?  
| 
| 
| -- 
| Alastair Reid[EMAIL PROTECTED]
http://www.cs.utah.edu/~reid/

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: Syntax for implicit parameters

2001-04-18 Thread Marcin 'Qrczak' Kowalczyk

Wed, 18 Apr 2001 11:31:07 -0600 (MDT), Alastair Reid [EMAIL PROTECTED] pisze:

 Can the GHC people, the Hugs people and the implicit parameter
 designers come to some sort of agreement and implement the result?  

I would like to replace "with" and "dlet" with "let". But SimonPJ said
he won't do it in ghc unless Hugs does it too, and Mark P Jones said
he won't do it in Hugs now (without deep reasons: no people/hours to
do that, and no plans to release next Hugs version this year).

-- 
 __("  Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/
  ^^  SYGNATURA ZASTPCZA
QRCZAK


___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: Syntax for implicit parameters

2001-04-18 Thread Marcin 'Qrczak' Kowalczyk

Wed, 18 Apr 2001 10:41:45 -0700, Erik Meijer [EMAIL PROTECTED] pisze:

 As I was not involved in that discussion, why should the keyword
 "with" not be introduced?

There are at least two libraries in hslibs which would like to use
'with' as an identifier.

Foreign currently uses 'withObject', where only 'with' would be
consistent. This function is related to 'withArray' as 'poke' is
related to 'pokeArray'.

XmlCombinators switched -fglasgow-exts off when 'with' was
introduced. One cannot use this function direcly from a code compiled
under -fglasgow-exts.

-- 
 __("  Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/
  ^^  SYGNATURA ZASTPCZA
QRCZAK


___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: Syntax for implicit parameters

2001-04-18 Thread Alastair Reid


Marcin Kowalczyk ([EMAIL PROTECTED]) writes:
 I would like to replace "with" and "dlet" with "let". But SimonPJ
 said he won't do it in ghc unless Hugs does it too, and Mark P Jones
 said he won't do it in Hugs now (without deep reasons: no
 people/hours to do that, and no plans to release next Hugs version
 this year).

I'd really, really like to see a fresh release of Hugs which includes
the recently added support for imprecise exception handling (a la
GHC).  This is what HGL (and Fran) need to work with Hugs.

I volunteer to implement whatever implicit parameter syntax is decided
in Hugs.


-- 
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Syntax for implicit parameters

2001-04-18 Thread Alastair Reid


Some months ago, there was talk about making sure GHC and Hugs use the
same syntax for implicit parameters and (most importantly) that that
syntax should not introduce the keyword "with".

As far as I can see (from looking at both parsers and trying
examples), this discussion has not been acted on.  Hugs seems to
allow:

  dlet ?x = 'a' in ?x + 1
  ?x + 1 with ?x = 'a'

and GHC 5.0 only seems to support:

  ?x + 1 with ?x = 'a'

Can the GHC people, the Hugs people and the implicit parameter
designers come to some sort of agreement and implement the result?  


-- 
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: Syntax for implicit parameters

2001-04-18 Thread Erik Meijer

As I was not involved in that discussion, why should the keyword "with" not
be introduced?


Just curious,

Erik
- Original Message -
From: "Alastair Reid" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 10:31 AM
Subject: Syntax for implicit parameters



 Some months ago, there was talk about making sure GHC and Hugs use the
 same syntax for implicit parameters and (most importantly) that that
 syntax should not introduce the keyword "with".

 As far as I can see (from looking at both parsers and trying
 examples), this discussion has not been acted on.  Hugs seems to
 allow:

   dlet ?x = 'a' in ?x + 1
   ?x + 1 with ?x = 'a'

 and GHC 5.0 only seems to support:

   ?x + 1 with ?x = 'a'

 Can the GHC people, the Hugs people and the implicit parameter
 designers come to some sort of agreement and implement the result?


 --
 Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/

 ___
 Hugs-Bugs mailing list
 [EMAIL PROTECTED]
 http://www.haskell.org/mailman/listinfo/hugs-bugs


___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs