Re: [Haskell-cafe] Re: Haskell code for this example of flow control

2006-02-04 Thread Bulat Ziganshin
Hello MaurĂ­cio, Friday, February 03, 2006, 7:28:16 PM, you wrote: MI wonder if I could write a generic while based on your example: while :: (a - IO a) - (a - Bool) - IO () MI'll probably learn something trying that. i have about 5-10 imperative control structures defined in my common

[Haskell-cafe] request for help

2006-02-04 Thread Bulat Ziganshin
Hello haskell-cafe, i'm wrote new general i/o library called Streams. it's so great that i hope it will eventually replace using Handles. i plan to present it in Haskell list on Monday. in order to do it i wrote overview of library facilities. the problem is that i'm not native english speaker

[Haskell-cafe] Re: strict Haskell dialect

2006-02-04 Thread Ben Rudiak-Gould
Chris Kuklewicz wrote: Weak uses seq to achieve WHNF for it's argument newtype Weak a = WeakCon {runWeak :: a} mkWeak x = seq x (WeakCon x) unsafeMkWeak x = WeakCon x This doesn't actually do what you think it does. mkWeak and unsafeMkWeak are the same function. mkWeak 123 = seq 123

[Haskell-cafe] Re: Haskell code for this example of flow control

2006-02-04 Thread Dominic Steinitz
Here are some even older discussions on the subject. I don't know if anyone ever put them into a library or on the wiki. Dominic. http://haskell.org/pipermail/haskell-cafe/2005-May/009784.html http://www.haskell.org//pipermail/libraries/2005-February/003143.html

[Haskell-cafe] does haskell have plist's ?

2006-02-04 Thread raptor
does Haskell have a property lists. Like Lisp ? any pointer to examples ? tia ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Why is $ right associative instead of left associative?

2006-02-04 Thread Brian Hulley
Hi - In the Haskell98 report section 4.4.2 $ is specified as being right associative. This means that f $ a0 a1 $ b0 b1 would parse as f (a0 a1 (b0 b1)) which seems rather strange to me. Surely it would be much more useful if $ were defined as left associative so that it could be used to

Re: [Haskell-cafe] Why is $ right associative instead of left associative?

2006-02-04 Thread Tomasz Zielonka
On Sat, Feb 04, 2006 at 02:52:20PM -, Brian Hulley wrote: Hi - In the Haskell98 report section 4.4.2 $ is specified as being right associative. This means that f $ a0 a1 $ b0 b1 would parse as f (a0 a1 (b0 b1)) which seems rather strange to me. Surely it would be much more useful if $

Re: [Haskell-cafe] does haskell have plist's ?

2006-02-04 Thread J. Garrett Morris
On 2/4/06, raptor [EMAIL PROTECTED] wrote: does Haskell have a property lists. Like Lisp ? any pointer to examples ? Not built in to the language. It's not hard to get the same functionality though - I've attached a module that takes a (not tremendously elegant) approach to the same thing,

Re: [Haskell-cafe] Why is $ right associative instead of left associative?

2006-02-04 Thread Brian Hulley
Tomasz Zielonka wrote: On Sat, Feb 04, 2006 at 02:52:20PM -, Brian Hulley wrote: Hi - In the Haskell98 report section 4.4.2 $ is specified as being right associative. This means that f $ a0 a1 $ b0 b1 would parse as f (a0 a1 (b0 b1)) which seems rather strange to me. Surely it would be much

Re: [Haskell-cafe] Re[2]: strict Haskell dialect

2006-02-04 Thread Jan-Willem Maessen
On Feb 3, 2006, at 8:16 PM, Brian Hulley wrote: Jan-Willem Maessen wrote: I pointed out some problems with strict Haskell in a recent talk, but I think it'd be worth underscoring them here in this forum. Is the text of this talk or points raised in it available online anywhere? snip

Re: [Haskell-cafe] Why is $ right associative instead of left associative?

2006-02-04 Thread Taral
On 2/4/06, Brian Hulley [EMAIL PROTECTED] wrote: Does anyone know why this strange associativity was chosen? I think it's very natural. Everything after the $, including other $ expressions, is applied to the stuff before the $. This saves me from a lot of nested parentheses. It seems to be

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Brian Hulley
Brian Hulley wrote: Tomasz Zielonka wrote: On Sat, Feb 04, 2006 at 02:52:20PM -, Brian Hulley wrote: Hi - In the Haskell98 report section 4.4.2 $ is specified as being right associative. This means that f $ a0 a1 $ b0 b1 would parse as f (a0 a1 (b0 b1)) which seems rather strange to me.

Re: [Haskell-cafe] Why is $ right associative instead of left associative?

2006-02-04 Thread Stefan Holdermans
Taral wrote: I think it's very natural. Everything after the $, including other $ expressions, is applied to the stuff before the $. This saves me from a lot of nested parentheses. To me, ($) helping me to avoid writing lots of parentheses, makes it extremely useful. Actually: except for

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Tomasz Zielonka
On Sat, Feb 04, 2006 at 07:15:47PM -, Brian Hulley wrote: I think the mystery surrounding :: and : might have been that originally people thought type annotations would hardly ever be needed whereas list cons is often needed, but now that it is regarded as good practice to put a type

Re: [Haskell-cafe] Why is $ right associative instead of left associative?

2006-02-04 Thread Tomasz Zielonka
On Sat, Feb 04, 2006 at 08:37:51PM +0100, Stefan Holdermans wrote: Taral wrote: I think it's very natural. Everything after the $, including other $ expressions, is applied to the stuff before the $. This saves me from a lot of nested parentheses. To me, ($) helping me to avoid writing

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Stefan Holdermans
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian wrote: I think the mystery surrounding :: and : might have been that originally people thought type annotations would hardly ever be needed whereas list cons is often needed, but now that it is regarded as good practice to put a type

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Brian Hulley
Tomasz Zielonka wrote: On Sat, Feb 04, 2006 at 07:15:47PM -, Brian Hulley wrote: I think the mystery surrounding :: and : might have been that originally people thought type annotations would hardly ever be needed whereas list cons is often needed, but now that it is regarded as good

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Brian Hulley
Stefan Holdermans wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian wrote: I think the mystery surrounding :: and : might have been that originally people thought type annotations would hardly ever be needed whereas list cons is often needed, but now that it is regarded as good

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Paul Hudak
Actually, one of the main reasons that we chose (:) is that that's what Miranda used. So, at the time at least, it was not entirely clear what the de facto universal inter-language standard was. In any case, I agree with Stefan regarding Haskell Prime! -Paul Stefan Holdermans wrote:

Re: [Haskell-cafe] does haskell have plist's ?

2006-02-04 Thread Bulat Ziganshin
Hello raptor, Saturday, February 04, 2006, 7:06:39 PM, you wrote: r does Haskell have a property lists. Like Lisp ? r any pointer to examples ? no. Haskell data values don't carry any invisible information besides of lazyness. in this aspect Haskell is like other compiled languages like C where

Re[2]: [Haskell-cafe] request for help

2006-02-04 Thread Bulat Ziganshin
Hello Marco, Saturday, February 04, 2006, 4:39:23 PM, you wrote: MAFdA Hello. MAFdA English is not my native language (I'm Portuguese). MAFdA The haskell-cafe mailing list is usually very active and subscribers MAFdA do help each other, so I believe you will not have any trouble in MAFdA finding

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Cale Gibbard
On 04/02/06, Brian Hulley [EMAIL PROTECTED] wrote: Stefan Holdermans wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian wrote: I think the mystery surrounding :: and : might have been that originally people thought type annotations would hardly ever be needed whereas list

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Jared Updike
[a,b,c ; tail] === a :: b :: c :: tail -- where :: How is [a,b,c ; tail] simpler, clearer or less typing than a:b:c:tail ? I think that the commas and semicolons are easy to confuse. While we're talking about the aesthetics of :: and :, I like how a line with a

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Chris Kuklewicz
Brian Hulley wrote: Jared Updike wrote: [a,b,c ; tail] === a :: b :: c :: tail -- where :: How is [a,b,c ; tail] simpler, clearer or less typing than a:b:c:tail ? I think that the commas and semicolons are easy to confuse. It seems strange that you can write

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Bill Wood
On Sat, 2006-02-04 at 23:34 +, Chris Kuklewicz wrote: . . . But this implies [a,b,c,[]..] is the same as [a,b,c] and [a,b,c,[d,e,f]..] is the same as [a,b,c,d,e,f] and [a,b,c,[d,e,f..]..] is [a,b,c,d,e,f..] Hmmm, does this get us to difference lists ala Prolog? -- Bill Wood

Re: [Haskell-cafe] Why is $ right associative instead of left associative?

2006-02-04 Thread ajb
G'day all. Quoting Tomasz Zielonka [EMAIL PROTECTED]: Probably it was anticipated that right associative version will be more useful. You can use it to create a chain of transformations, similar to a chain of composed functions: (f . g . h) x = f $ g $ h $ x Of course, if $ were

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread ajb
G'day all. Quoting Paul Hudak [EMAIL PROTECTED]: Actually, one of the main reasons that we chose (:) is that that's what Miranda used. So, at the time at least, it was not entirely clear what the de facto universal inter-language standard was. Exactly. One point that's often not

Re: [Haskell-cafe] Why is $ right associative instead of left associative?

2006-02-04 Thread ajb
G'day all. Quoting [EMAIL PROTECTED]: This is the way that I normally express it. Partly because I find function application FAR more natural than right-associative application, I meant to say that I find function COMPOSITION more natural than right-associative application. It certainly

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Brian Hulley
[EMAIL PROTECTED] wrote: G'day all. Quoting [EMAIL PROTECTED]: This is the way that I normally express it. Partly because I find function application FAR more natural than right-associative application, I meant to say that I find function COMPOSITION more natural than right-associative

[Haskell-cafe] Re: Why is $ right associative instead of left associative?

2006-02-04 Thread Ben Rudiak-Gould
No one has mentioned yet that it's easy to change the associativity of $ within a module in Haskell 98: import Prelude hiding (($)) infixl 0 $ f$x = f x or, for the purists, import Prelude hiding (($)) import qualified Prelude (($)) infixl 0 $ ($) = (Prelude.$)

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Joseph H. Fasel III
These lineages are more or less right, except that there is a bit of incest: LML is certainly one of the progenitors of Haskell. (more semantically than syntactically, though) Cheers, --Joe [EMAIL PROTECTED] said: G'day all. Quoting Paul Hudak [EMAIL PROTECTED]: Actually, one of the main

Re: [Haskell-cafe] Haskell to call Microsoft COM (Dispatch)

2006-02-04 Thread Marsh J. Ray
Marc Weber wrote: Hi. I spent much time trying to get it to work.. you have to download the whole fptools directory (from cvs!).. and I think i did some little patches but I can check out again and compare.. It did compile and I think it's working well but I'm still struggling getting to use