From arkrost at gmail.com Tue Nov 24 15:46:21 2009 From: arkrost at gmail.com (=?KOI8-R?B?4dLLwcTJyiDyz9PU?=) Date: Tue Nov 24 15:21:26 2009 Subject: export keyword Message-ID: <373fe6a90911241246g4d5aa85cm9d53f2877d25b38c@mail.gmail.com> What about using export keyword to mark the exporting functions? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell-prime/attachments/20091124/74a83b6a/attachment.html From Christian.Maeder at dfki.de Thu Nov 26 04:29:10 2009 From: Christian.Maeder at dfki.de (Christian Maeder) Date: Thu Nov 26 04:04:12 2009 Subject: DoAndIfThenElse Message-ID: <4B0E4A66.8070607@dfki.de> Hi, seeing Haskell 2010 and http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse saying: Compiler support ? GHC full (no flag) I wonder why I still get a "parse error (possibly incorrect indentation)" for: \begin{code} main = do if True then putStrLn "1" else putStrLn "2" \end{code} Can I try out this feature somehow? Cheers Christian From dav.vire+haskell at gmail.com Thu Nov 26 07:05:28 2009 From: dav.vire+haskell at gmail.com (David Virebayre) Date: Thu Nov 26 06:40:29 2009 Subject: DoAndIfThenElse In-Reply-To: <4B0E4A66.8070607@dfki.de> References: <4B0E4A66.8070607@dfki.de> Message-ID: <4c88418c0911260405s3a2fccfetfd13fee57bdbf97b@mail.gmail.com> On Thu, Nov 26, 2009 at 10:29 AM, Christian Maeder wrote: I wonder why I still get a "parse error (possibly incorrect > indentation)" for: > > \begin{code} > main = do > if True then putStrLn "1" > else putStrLn "2" > \end{code} > > Isn't the proposal about : \begin{code} main = do if True then putStrLn "1" ;else putStrLn "2" \end{code} ? David. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell-prime/attachments/20091126/1f47d429/attachment.html From igloo at earth.li Thu Nov 26 07:21:42 2009 From: igloo at earth.li (Ian Lynagh) Date: Thu Nov 26 06:56:42 2009 Subject: DoAndIfThenElse In-Reply-To: <4B0E4A66.8070607@dfki.de> References: <4B0E4A66.8070607@dfki.de> Message-ID: <20091126122142.GA387@matrix.chaos.earth.li> Hi Christian, On Thu, Nov 26, 2009 at 10:29:10AM +0100, Christian Maeder wrote: > > seeing Haskell 2010 and > http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse > > saying: > Compiler support ? > GHC full (no flag) > > I wonder why I still get a "parse error (possibly incorrect > indentation)" for: > > \begin{code} > main = do > if True then putStrLn "1" > else putStrLn "2" > \end{code} > > Can I try out this feature somehow? I can't see any support for it in GHC, even in the HEAD. The page claims "full (no flag)" for every implementation, so I'd guess it's just a boilerplate table that hasn't been properly filled in. Thanks Ian From Christian.Maeder at dfki.de Thu Nov 26 07:23:50 2009 From: Christian.Maeder at dfki.de (Christian Maeder) Date: Thu Nov 26 06:58:52 2009 Subject: DoAndIfThenElse In-Reply-To: <4c88418c0911260405s3a2fccfetfd13fee57bdbf97b@mail.gmail.com> References: <4B0E4A66.8070607@dfki.de> <4c88418c0911260405s3a2fccfetfd13fee57bdbf97b@mail.gmail.com> Message-ID: <4B0E7356.7060600@dfki.de> David Virebayre schrieb: > Isn't the proposal about : > > \begin{code} > main = do > if True then putStrLn "1" > ;else putStrLn "2" > \end{code} This should go through, too, but also does not for me according to http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse Change the syntax for conditionals to exp -> if exp1 [;] then exp2 [;] else exp3 i.e., add optional semicolons before then and else, making the above example legal. This has been recently added to jhc, GHC and Hugs, and so far it has not caused any problems. But the main purpose of the proposal was to support the notation without ";" and the indentation by at least one character. I just do not see that it "has been recently added to GHC" I've checked ghc-6.10.4 and 6.12.0.20091010 Cheers Christian From Christian.Maeder at dfki.de Thu Nov 26 09:14:13 2009 From: Christian.Maeder at dfki.de (Christian Maeder) Date: Thu Nov 26 08:49:15 2009 Subject: DoAndIfThenElse In-Reply-To: <4c88418c0911260405s3a2fccfetfd13fee57bdbf97b@mail.gmail.com> References: <4B0E4A66.8070607@dfki.de> <4c88418c0911260405s3a2fccfetfd13fee57bdbf97b@mail.gmail.com> Message-ID: <4B0E8D35.7040308@dfki.de> David Virebayre schrieb: > > On Thu, Nov 26, 2009 at 10:29 AM, Christian Maeder > > wrote: > > I wonder why I still get a "parse error (possibly incorrect > indentation)" for: > > \begin{code} > main = do > if True then putStrLn "1" > else putStrLn "2" > \end{code} This works with hugs! > > Isn't the proposal about : > > \begin{code} > main = do > if True then putStrLn "1" > ;else putStrLn "2" > \end{code} This does not work with hugs. ";" must be indented further. \begin{code} main = do if True then putStrLn "1"; else putStrLn "2" \end{code} This does also not work with hugs (";" at the end) C. From igloo at earth.li Thu Nov 26 09:23:36 2009 From: igloo at earth.li (Ian Lynagh) Date: Thu Nov 26 08:58:36 2009 Subject: DoAndIfThenElse In-Reply-To: <4B0E8D35.7040308@dfki.de> References: <4B0E4A66.8070607@dfki.de> <4c88418c0911260405s3a2fccfetfd13fee57bdbf97b@mail.gmail.com> <4B0E8D35.7040308@dfki.de> Message-ID: <20091126142336.GA5742@matrix.chaos.earth.li> On Thu, Nov 26, 2009 at 03:14:13PM +0100, Christian Maeder wrote: > David Virebayre schrieb: > > > > On Thu, Nov 26, 2009 at 10:29 AM, Christian Maeder > > > wrote: > > > > I wonder why I still get a "parse error (possibly incorrect > > indentation)" for: > > > > \begin{code} > > main = do > > if True then putStrLn "1" > > else putStrLn "2" > > \end{code} > > This works with hugs! > > > > > Isn't the proposal about : > > > > \begin{code} > > main = do > > if True then putStrLn "1" > > ;else putStrLn "2" > > \end{code} > > This does not work with hugs. ";" must be indented further. > > \begin{code} > main = do > if True then putStrLn "1"; > else putStrLn "2" > \end{code} > > This does also not work with hugs (";" at the end) In both cases you have 2 semi-colons before the else (after the layout rule has been applied). Thanks Ian From Christian.Maeder at dfki.de Fri Nov 27 13:14:03 2009 From: Christian.Maeder at dfki.de (Christian Maeder) Date: Fri Nov 27 12:49:02 2009 Subject: DoAndIfThenElse In-Reply-To: References: <4B0E4A66.8070607@dfki.de> <4c88418c0911260405s3a2fccfetfd13fee57bdbf97b@mail.gmail.com> <4B0E8D35.7040308@dfki.de> Message-ID: <4B1016EB.6090305@dfki.de> S. Doaitse Swierstra schrieb: [..] >> \begin{code} >> main = do >> if True then putStrLn "1"; >> else putStrLn "2" >> \end{code} >> >> This does also not work with hugs (";" at the end) > > This does not work since now you have two ";"'s; one because you wrote > one and one because you did not indent the else. Allowing this > additional ; was done to prevent confusion, and as you can see even more > confusion pops up now;-{{ That is why I expressed my concerns about this > grammar patch. > > Doaitse Indeed, these semicolons are confusing. I think it should be possible to allow "then" and "else" starting in the same column as "if" without these ";"s (in a do block). Christian From JohnDEarle at cox.net Fri Nov 27 16:21:00 2009 From: JohnDEarle at cox.net (John D. Earle) Date: Fri Nov 27 15:56:10 2009 Subject: On the Meaning of Haskell In-Reply-To: <4B1016EB.6090305@dfki.de> References: <4B0E4A66.8070607@dfki.de><4c88418c0911260405s3a2fccfetfd13fee57bdbf97b@mail.gmail.com><4B0E8D35.7040308@dfki.de> <4B1016EB.6090305@dfki.de> Message-ID: <95BDE211C80F46BCBAD3070596ECEEC2@JohnPC> While reading what Cynbe had to say at http://mythryl.org/ concerning the design of his language I came across the following: Simon Peyton-Jones refers to programming under this strict constraint as "wearing the hair shirt". What Simon wrote caused me to reflect on its meaning for a time. I feel that what Simon is saying is that if you value the truth, you will be willing to suffer for it. Apparently, Cynbe is not willing to suffer. As such the Pagan motif is appropriate. From JohnDEarle at cox.net Fri Nov 27 16:44:47 2009 From: JohnDEarle at cox.net (John D. Earle) Date: Fri Nov 27 16:19:56 2009 Subject: On the Meaning of Haskell 2 In-Reply-To: <95BDE211C80F46BCBAD3070596ECEEC2@JohnPC> References: <4B0E4A66.8070607@dfki.de><4c88418c0911260405s3a2fccfetfd13fee57bdbf97b@mail.gmail.com><4B0E8D35.7040308@dfki.de><4B1016EB.6090305@dfki.de> <95BDE211C80F46BCBAD3070596ECEEC2@JohnPC> Message-ID: <309A3980D789460D963C83F1691C9AB6@JohnPC> If computer programs are speech as in a form of literature, the preparation of speech under constraints is poetry. From allbery at ece.cmu.edu Fri Nov 27 17:14:26 2009 From: allbery at ece.cmu.edu (Brandon S. Allbery KF8NH) Date: Fri Nov 27 16:49:33 2009 Subject: On the Meaning of Haskell 2 In-Reply-To: <309A3980D789460D963C83F1691C9AB6@JohnPC> References: <4B0E4A66.8070607@dfki.de><4c88418c0911260405s3a2fccfetfd13fee57bdbf97b@mail.gmail.com><4B0E8D35.7040308@dfki.de><4B1016EB.6090305@dfki.de> <95BDE211C80F46BCBAD3070596ECEEC2@JohnPC> <309A3980D789460D963C83F1691C9AB6@JohnPC> Message-ID: <9F047089-EAE4-4E9A-B1F8-84EE455E2191@ece.cmu.edu> On Nov 27, 2009, at 16:44 , John D. Earle wrote: > If computer programs are speech as in a form of literature, the > preparation of speech under constraints is poetry. With the appropriate EDSL, that could be literal. (Perl poetry, anyone?) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 195 bytes Desc: This is a digitally signed message part Url : http://www.haskell.org/pipermail/haskell-prime/attachments/20091127/68a1d5d5/PGP.bin From JohnDEarle at cox.net Sat Nov 28 18:20:29 2009 From: JohnDEarle at cox.net (John D. Earle) Date: Sat Nov 28 17:55:40 2009 Subject: On the Meaning of Haskell 3 Message-ID: <1087102EFB594E5C92D165F7E91DDB1A@JohnPC> I believe Simon got right what he got right, but nothing more. Haskell is an experimental language that is taking off prematurely. In my opinion it needs to be taken back to the drawing boards and overhauled before it is too late. It may already be too late unfortunately. We may have to live with whatever mistakes that were made for the next 100 years. Sometimes success is not a good thing. Haskell can easily become yet another defective language. Backward compatibility will likely need to be thrown out the door if Haskell is to ever stand for the "truth". Greater rigor in getting it right is needed. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell-prime/attachments/20091128/d9cd0395/attachment.html From jason.dusek at gmail.com Sat Nov 28 18:31:09 2009 From: jason.dusek at gmail.com (Jason Dusek) Date: Sat Nov 28 18:06:02 2009 Subject: On the Meaning of Haskell 3 In-Reply-To: <1087102EFB594E5C92D165F7E91DDB1A@JohnPC> References: <1087102EFB594E5C92D165F7E91DDB1A@JohnPC> Message-ID: <42784f260911281531x7528462je2b06d721a0965b3@mail.gmail.com> Haskell will die with the two Simons. The future lies with Agda or Epigram or Coq. We shouldn't try too hard to get Haskell right -- it will never be right -- but, rather, we should all think about how we're going to migrate away from Haskell to something even better. What can we do now -- in terms of multi-versioning, compiled module interfaces and approaches to modularity that are about servers and pipes instead of linking -- to make it easy to move away from Haskell module by module? -- Jason Dusek From JohnDEarle at cox.net Sat Nov 28 22:57:43 2009 From: JohnDEarle at cox.net (John D. Earle) Date: Sat Nov 28 22:32:55 2009 Subject: On the Meaning of Haskell 4 Message-ID: Experimental languages are intended to prove a point. "Agda or Epigram or Coq" and the like are experimental as well so it seems moot to say they are the future. The question is, Is Haskell a solid foundation to build upon? The Haskell language has been brave and perhaps too brave. Everyone knew that layout could get you into trouble and so most everyone had the good sense to avoided it. With Haskell it made sense due to its emphasis on white space. In typography white space is crucial. It is helpful to clear away the clutter that fogs the mind. When it is beautiful it is easier to read. It becomes a pleasure to read. I take no issue with the two Simons for being uncompromising. This is to be admired. As layout is concerned though it was risky, I'm not ready to give up on layout. Apart from those who state objection to Haskell in that it does not behave like C. Since the paradigms are different one could expect that how things are done are different. So I'm throwing that out and them out with it. It is not a cogent criticism. There are still things that can be done, but it involves breaking with backward compatibility and doing it right this time. Near perfection is possible. You just have to want it bad enough. It is funny that you should speak of the Coq proof assistant and related projects. You don't get it do you? It isn't about kind of getting it right. It is about having a formal mathematical proof that you got it right. I'm uncertain if Haskell in its present state can deliver. With all this monkeying with the language and ad-hoc changes it won't improve things. It will just be business as usual. Though Epigram is written in Haskell I don't see it going anywhere. Coq is not written in Haskell. Most proof assistants worth their salt aren't. I think I now understand why. Haskell has a grocery list of proof assistant projects that either were abandoned or look like they were abandoned. I don't think that should be, but maybe I'm just in the minority. If you think "Agda or Epigram or Coq" is the future, why then do you hold such thoughts as "We shouldn't try too hard to get Haskell right". It doesn't follow logically. Someone has got to get it right for Epigram, et al, to get it right. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell-prime/attachments/20091128/1e91d30d/attachment.html From JohnDEarle at cox.net Mon Nov 30 02:56:01 2009 From: JohnDEarle at cox.net (John D. Earle) Date: Mon Nov 30 02:30:58 2009 Subject: On the Meaning of Haskell 5 Message-ID: I was going through my library and while scanning through everything something germane caught my eye. It was from something that Stephen Gilmore of The University of Edinburgh wrote, namely "Programming in Standard ML '97: A Tutorial Introduction". A copy can be gotten from the Moscow ML home page. I feel that he put the matter well. In section 1.2 he writes: "It is ... perfectly easy to imagine users finding fault with a correct program which has some missing functionality which they would like." With this there is also a temptation to screw things up if you have the power to do so. If may feel democratic, but you won't really be doing anyone a favor. There is a need to reserve judgment until a comprehensive understanding and appreciation of the language is achieved. For example, I find it curious that if-then-else constructs are defined in terms of case-of and not the other way around. This is conspicuous and so there may be good cause for why it was done this way. I chose to err on the possibility that the Forefathers of Haskell knew what they were doing and it is just that I do not yet fully understand the why. The if-then-else construct as it is defined in other languages is more general than case-of. It appears that in Haskell the if-then-else construct though a prominent feature of many languages has no real significance as Haskell is concerned and is there solely for convenience. Rather than molesting Haskell to make nice to those whose delicate sensibilities are offended by how the if-then-else construct has been formulated it may be best to remove the if-then-else construct from the language altogether since it appears that the if-then-else construct was an ad-hoc addition or is a vestigial appendage that serves only to confuse the reader. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell-prime/attachments/20091130/0328d527/attachment-0001.html From JohnDEarle at cox.net Mon Nov 30 03:46:35 2009 From: JohnDEarle at cox.net (John D. Earle) Date: Mon Nov 30 03:21:32 2009 Subject: On the Meaning of Haskell 6 Message-ID: <325129BE5FED4D94A1D4FAD6F7164573@JohnPC> I have used the expression Forefathers of Haskell before. Someone earlier wrote "Haskell will die with the two Simons." Cruel words that perhaps were not meant to be cruel per se, just a perceived fact. Making the ancient sign with my hand that signifies my authority as a teacher my response is as follows: One must master logic, but not be its slave. In so many ways it is true, from dust to dust; but any earnest entreaty upon this hallowed ground would involve a token of respect such as this. We are fortunate that we have him. Let us not be neglectful for what we have while we still have it! In retrospect poor Simon may have said to himself, "What! I'm not dead and buried yet! What is this man saying! I'm not that old!" Perhaps I have caused him to chuckle privately. I would prefer the later. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell-prime/attachments/20091130/25db3d31/attachment.html From marlowsd at gmail.com Mon Nov 30 05:59:56 2009 From: marlowsd at gmail.com (Simon Marlow) Date: Mon Nov 30 05:35:03 2009 Subject: On the Meaning of Haskell 6 In-Reply-To: <325129BE5FED4D94A1D4FAD6F7164573@JohnPC> References: <325129BE5FED4D94A1D4FAD6F7164573@JohnPC> Message-ID: <4B13A5AC.3090700@gmail.com> This kind of discussion would be more appropriate on the haskell-cafe mailing list. haskell-prime@haskell.org is specifically for discussing proposals for changes in future revisions of the Haskell language. Thanks. Simon On 30/11/2009 08:46, John D. Earle wrote: > I have used the expression Forefathers of Haskell before. Someone > earlier wrote "Haskell will die with the two Simons." Cruel words that > perhaps were not meant to be cruel per se, just a perceived fact. Making > the ancient sign with my hand that signifies my authority as a teacher > my response is as follows: One must master logic, but not be its slave. > In so many ways it is true, from dust to dust; but any earnest entreaty > upon this hallowed ground would involve a token of respect such as this. > We are fortunate that we have him. Let us not be neglectful for what we > have while we still have it! > In retrospect poor Simon may have said to himself, "What! I'm not dead > and buried yet! What is this man saying! I'm not that old!" Perhaps I > have caused him to chuckle privately. I would prefer the later. > > > > _______________________________________________ > Haskell-prime mailing list > Haskell-prime@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-prime From JohnDEarle at cox.net Mon Nov 30 14:56:41 2009 From: JohnDEarle at cox.net (John D. Earle) Date: Mon Nov 30 14:31:44 2009 Subject: On the Meaning of Haskell 7 Message-ID: <2E69EFA940F146BD82355E0E437E3552@JohnPC> This may be the last in the series given that Simon Marlow feels that I am being non-sequitur. I on the other hand feel that I am being very much on topic. To quote Dune, "They move in mysterious ways." I wanted to complete a thought and I thought to end it on number 7. My guess is why the case-of construct is preferred is due to Haskell being a functional language. In other words the world is to be wrapped up into a ball and passed like a basketball. The if-then-else paradigm holds a world view where the world consists of disparate parts to be accessed and tested, however. This supports my thesis. It may be worth considering the removal of if-then-else as opposed to fixing it. Simon Marlow wrote "haskell-prime@haskell.org is specifically for discussing proposals for changes in future revisions of the Haskell language." I have an anti-proposal. Do not change anything unless you know what you are doing. Don't make a proposal unless you know what you are saying. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell-prime/attachments/20091130/80c4708b/attachment.html From pumpkingod at gmail.com Mon Nov 30 14:59:05 2009 From: pumpkingod at gmail.com (Daniel Peebles) Date: Mon Nov 30 14:33:51 2009 Subject: On the Meaning of Haskell 7 In-Reply-To: <2E69EFA940F146BD82355E0E437E3552@JohnPC> References: <2E69EFA940F146BD82355E0E437E3552@JohnPC> Message-ID: I think it's more about readership. There's almost nobody on this mailing list, and haskell-cafe has way more traffic. You might actually get feedback about your ideas there. On Mon, Nov 30, 2009 at 2:56 PM, John D. Earle wrote: > This may be the last in the series given that Simon Marlow feels that I am > being non-sequitur. I on the other hand feel that I am being very much on > topic. To quote Dune, "They move in mysterious ways." I wanted to complete a > thought and I thought to end it on number 7. > > My guess is why the case-of construct is preferred is due to Haskell being a > functional language. In other words the world is to be wrapped up into a > ball and passed like a basketball. The if-then-else paradigm holds a world > view where the world consists of disparate parts to be accessed and tested, > however. This supports my thesis. It may be worth considering the removal of > if-then-else as opposed to fixing it. > > Simon Marlow wrote "haskell-prime@haskell.org is specifically for discussing > proposals for changes in future revisions of the Haskell language." I have > an anti-proposal. Do not change anything unless you know what you are doing. > Don't make a proposal unless you know what you are saying. > _______________________________________________ > Haskell-prime mailing list > Haskell-prime@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-prime > >