Re: macros. Was: Arrow notation, etc.

2001-10-14 Thread Fergus Henderson
y are just an efficiency hack, and one which is already looking somewhat dated -- a bit like the "register" keyword in C. This is quite different to the kind of macros that would allow you to extend the language syntax to support things like arrow notation or views. -- Fergus Henderso

Re: macros. Was: Arrow notation, etc.

2001-10-12 Thread Marcin 'Qrczak' Kowalczyk
Fri, 12 Oct 2001 15:38:21 +0200, Jerzy Karczmarczuk <[EMAIL PROTECTED]> pisze: > They are heavily used in Clean, so, there *are* people who see a > need for them in a lazy language. The Clean implementation doesn't inline functions across modules, right? -- __("< Marcin Kowalczyk * [EMAIL PR

macros. Was: Arrow notation, etc.

2001-10-12 Thread Jerzy Karczmarczuk
you can write "if" in Haskell already, for > > example, whereas you need a macro for it in Lisp. Your arrow notation > > example may provide some motivation, though. > > I wonder if macros could also be used to implement views. They are heavily used in Clean, so, ther

Re: Arrow notation, etc.

2001-10-12 Thread Ross Paterson
On Fri, Oct 12, 2001 at 08:33:15PM +0900, Dylan Thurston wrote: > So when I read the "Syntactic Sugar for Arrows" proposal, my initial > reaction is "Wow, that's a little complicated. It doesn't look like > syntactic sugar to me." Why, thank you! > This contrasts with the do-notation, which doe

Re: Arrow notation, etc.

2001-10-12 Thread Dylan Thurston
already, for > example, whereas you need a macro for it in Lisp. Your arrow notation > example may provide some motivation, though. I wonder if macros could also be used to implement views. I think there were other times I wanted to play similar tricks with scoping, but I don't remem

Re: Arrow notation, etc.

2001-10-12 Thread Keith Wansbrough
> Very good. Is there a concrete proposal for such macros? I think the > arrow notation would be a harder test case than any of the existing > syntactic sugar; I'd be curious to see what it looked like. (And is > there support for adding these macros to Haskell?) Sadly, there

Re: Arrow notation, etc.

2001-10-12 Thread Dylan Thurston
h99:Macros > > Wansbrough, 1999. Macros and Preprocessing in Haskell > > especially section 8. Very good. Is there a concrete proposal for such macros? I think the arrow notation would be a harder test case than any of the existing syntactic sugar; I'd be curious to see what it

Re: Arrow notation, etc.

2001-10-12 Thread Keith Wansbrough
Dylan writes: > Incidentally, it seems to me that this is one case where a Lisp-like > macro facility might be useful. With Haskell, it is impossible to > play with bindings, while presumably you can do this with good Lisp > macro systems. Yes, this is one thing you can do with good macro syste

Arrow notation, etc.

2001-10-12 Thread Dylan Thurston
So when I read the "Syntactic Sugar for Arrows" proposal, my initial reaction is "Wow, that's a little complicated. It doesn't look like syntactic sugar to me." (Err, no offense, I hope.) This contrasts with the do-notation, which does look like syntactic sugar: you can rewrite any do expressio

arrow notation

2000-05-22 Thread Ross Paterson
I've updated my proposal for a sugared notation for arrows: http://www.soi.city.ac.uk/~ross/arrows/sugar.html with a very rough preprocessor for the new constructs, based on hsparser (which was a great help). None of this will make sense unless you've read John Hughes's arrows paper. A