[Haskell-cafe] Re: a regressive view of support for imperative programming in Haskell

2007-08-14 Thread apfelmus
Stefan O'Rear wrote: apfelmus wrote: My assumption is that we have an equivalence forall a,b . m (a - m b) ~ (a - m b) because any side effect executed by the extra m on the outside can well be delayed until we are supplied a value a. Well, at least when all arguments are fully applied,

[Haskell-cafe] Re: a regressive view of support for imperative programming in Haskell

2007-08-13 Thread apfelmus
Benjamin Franksen wrote: As has been already mentioned in this thread, in http://www.soi.city.ac.uk/~ross/papers/Applicative.html Conor McBride and Ross Paterson invent/explain a new type class that is now part of the base package (Control.Applicative). They also use/propose syntactic sugar for

Re: [Haskell-cafe] Re: a regressive view of support for imperative programming in Haskell

2007-08-13 Thread Stefan O'Rear
On Mon, Aug 13, 2007 at 04:35:12PM +0200, apfelmus wrote: My assumption is that we have an equivalence forall a,b . m (a - m b) ~ (a - m b) because any side effect executed by the extra m on the outside can well be delayed until we are supplied a value a. Well, at least when all arguments

[Haskell-cafe] Re: a regressive view of support for imperative programming in Haskell

2007-08-13 Thread apfelmus
Stefan O'Rear schrieb: On Mon, Aug 13, 2007 at 04:35:12PM +0200, apfelmus wrote: My assumption is that we have an equivalence forall a,b . m (a - m b) ~ (a - m b) because any side effect executed by the extra m on the outside can well be delayed until we are supplied a value a. Well, at

Re: [Haskell-cafe] Re: a regressive view of support for imperative programming in Haskell

2007-08-13 Thread Stefan O'Rear
On Mon, Aug 13, 2007 at 05:39:34PM +0200, apfelmus wrote: Stefan O'Rear schrieb: On Mon, Aug 13, 2007 at 04:35:12PM +0200, apfelmus wrote: My assumption is that we have an equivalence forall a,b . m (a - m b) ~ (a - m b) because any side effect executed by the extra m on the outside can

Re: [Haskell-cafe] Re: a regressive view of support for imperative programming in Haskell

2007-08-13 Thread Isaac Dupree
David Roundy wrote: The only cost is that this syntax relies on the do notation, and thus makes the desugaring of that do notation slightly more complicated when used. If I understand correctly, do blah f (do foo bar (- action) ) blah has an ambiguity: which

Re: [Haskell-cafe] Re: a regressive view of support for imperative programming in Haskell

2007-08-13 Thread David Roundy
On Mon, Aug 13, 2007 at 01:27:45PM -0300, Isaac Dupree wrote: David Roundy wrote: The only cost is that this syntax relies on the do notation, and thus makes the desugaring of that do notation slightly more complicated when used. If I understand correctly, do blah f (do

[Haskell-cafe] Re: a regressive view of support for imperative programming in Haskell

2007-08-09 Thread Benjamin Franksen
Donn Cave wrote: (I have a soft spot for O'Haskell, but alas I must be nearly alone on that.) You are /not/ alone :-) I always found it very sad that O'Haskell and also its sucessor Timber (with all the good real-time stuff added) died the 'quick death' of most research languages. Cheers

[Haskell-cafe] Re: a regressive view of support for imperative programming in Haskell

2007-08-09 Thread Benjamin Franksen
David Roundy wrote: Several times since reading the beginning of this discussion I've wished I had the new syntax so I could write something like: do if predicateOnFileContents (- readFile foo) then ... instead of either do contents - readFile foo if predicateOnFileContents

Re: [Haskell-cafe] Re: a regressive view of support for imperative programming in Haskell

2007-08-09 Thread David Menendez
On 8/9/07, Benjamin Franksen [EMAIL PROTECTED] wrote: Donn Cave wrote: (I have a soft spot for O'Haskell, but alas I must be nearly alone on that.) You are /not/ alone :-) I always found it very sad that O'Haskell and also its sucessor Timber (with all the good real-time stuff added) died

Re: [Haskell-cafe] Re: a regressive view of support for imperative programming in Haskell

2007-08-09 Thread David Roundy
On Thu, Aug 09, 2007 at 08:45:14PM +0200, Benjamin Franksen wrote: David Roundy wrote: Several times since reading the beginning of this discussion I've wished I had the new syntax so I could write something like: do if predicateOnFileContents (- readFile foo) then ... instead of