Re: Class System current status
Ben Rudiak-Gould wrote: = Partial p i b | p i - b where ... -- (*) I think it's fine. The p i b on the left is effectively a tuple also. The problem is that Partial p i b is application, while p i is not. Also, p i (on the right) denotes a set, not a tuple. I think this syntax is unnecessarily clever. But I agree that changing it might not be clever either. -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: Class System current status
Stephanie wrote: Simon, Why is an Appendix is better than just a footnote in the Standard that says we aren't sure, one way or the other, whether FDs will stay in the language for ever. Why do we need this extra structure? I'm worried that this extra structure could be confusing. In particular, if someone says this program is pure Haskell' what will that mean? In practice, will it be clear whether pure Haskell' includes the Appendix? I don't like the appendix idea either--or a footnote for that matter. I don't think a language definition should be cluttered by remarks about whether or not the designers are sure they got each bit right. It should just define a language. It seems to me that Haskell' is gaining a status in our minds that it doesn't deserve--that the main language report should be a thing of permanence that will stand the test of time. Previous versions of Haskell haven't. There was no footnote in the Haskell 1.2 report indicating that the IO system might be replaced... yet that's exactly what happened in 1.3, a much more dramatic change than replacing FDs by ATs will be. Future versions of Haskell may change things--that's a given. The language will continue to evolve. We've even been discussing changing the semantics of pattern matching this time around--which shows that even basic parts of the language may be called into question in the future. Haskell' should define a standard language for use TODAY--and it should be 100% clear what that language is, with no pussy-footing around difficult choices. In my view it should include FDs. Then in the future they may be replaced--but it should then be clear that this IS a replacement, with no arguments of the sort well it's not really an incompatible change because FDs were only in an appendix! Let's face it, people ARE going to use FDs whatever the standard says, because they're just so godamn useful, and rewriting those programs if FDs are replaced by ATs is not going to be any easier because it's an appendix that's changing, rather than the main body of the report. John ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: Class System current status
John Hughes: Haskell' should define a standard language for use TODAY--and it should be 100% clear what that language is, with no pussy-footing around difficult choices. In my view it should include FDs. Then in the future they may be replaced--but it should then be clear that this IS a replacement, with no arguments of the sort well it's not really an incompatible change because FDs were only in an appendix! Let's face it, people ARE going to use FDs whatever the standard says, because they're just so godamn useful, and rewriting those programs if FDs are replaced by ATs is not going to be any easier because it's an appendix that's changing, rather than the main body of the report. I agree that having FDs in the appendix does not make an essential difference to how easy they are to replace. Hence, I proposed a variation on this proposal is that we actually delay issuing the appendix. More precisely, * Specify MPTCs in the main language. * Finalise Haskell' without an FD/AT appendix. * Take our time to find out exactly how we want to do type level programming (with FDs, or ATs, or both). Once we know, we add an appendix on type-level programming. This moves the MPTC dilemma out of the critical path for Haskell' as a whole, but avoids that we have to rush the FD/AT issue. Manuel PS: I actually thought that this was what Simon proposed when he originally brought up the appendix idea, which may have been only between the class system subcommittee members. ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: Class System current status
On 2006-05-13, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Stephanie Weirich: Simon Peyton-Jones wrote: My suggestion is this: * Specify MPTCs in the main language * Specify FDs in an Appendix (with some reasonably conservative interpretation of FDs). * A Haskell' implementation should implement the Appendix, and programmers can write programs against it. But we are advertising specifically that we aren't sure, one way or the other, whether FDs will stay in the language for ever Simon, Why is an Appendix is better than just a footnote in the Standard that says we aren't sure, one way or the other, whether FDs will stay in the language for ever. Why do we need this extra structure? IMHO the right thing is to decouple finalising an FD/AT appendix from finalising the main body of Haskell'. This is clearly more easily realised when the delayed material is out-of-line. Meh. I'd really like a revised numeric prelude to be able to use MPTCs with FDs. -- Aaron Denney -- ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: Class System current status
Stephanie Weirich: Simon Peyton-Jones wrote: My suggestion is this: * Specify MPTCs in the main language * Specify FDs in an Appendix (with some reasonably conservative interpretation of FDs). * A Haskell' implementation should implement the Appendix, and programmers can write programs against it. But we are advertising specifically that we aren't sure, one way or the other, whether FDs will stay in the language for ever Simon, Why is an Appendix is better than just a footnote in the Standard that says we aren't sure, one way or the other, whether FDs will stay in the language for ever. Why do we need this extra structure? IMHO the right thing is to decouple finalising an FD/AT appendix from finalising the main body of Haskell'. This is clearly more easily realised when the delayed material is out-of-line. Manuel ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: Class System current status
- We're already in that state. There *is* a lot of Haskell code that uses FDs, it's just not Haskell 98 code. Whenever ATs take over, we'll still have to deal with this code. are you sure about *lots* ? i seen only 3-4 ones (monad transformers, collections, may be arrays, my streams) and think that all these libraries can be redesigned without any problems once in several years. OK, here's an example where I use functional dependencies: http://141.57.11.163/cgi-bin/cvsweb/tool/src/Challenger/Partial.hs?rev=1.23 class ( Show p, ToDoc i, Reader b, ToDoc b, Measure p i b ) = Partial p i b | p i - b where ... -- (*) containing two methods that don't use all type variables. (That's why I think I need the FD.) How would this look without FD? With ATs? Is there an altogether better design for this? Where I still would not need to change the client code? (*) A funny visual aspect of FDs is the absurd syntax. On the left of |, the whitespace is (type arg) application, but on the right, it suddenly denotes sequencing (tupling) Best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
RE: Class System current status
| So it looks like we're stuck at pretty much the same proposals for the | class system. ... | More generally, our discussion about the class system seems to be | stalled. How should we to come to a decision? I summarise my view of the state of play in the message below, which I see I did not circulate to all of haskell-prime at the time. My suggestion is this: * Specify MPTCs in the main language * Specify FDs in an Appendix (with some reasonably conservative interpretation of FDs). * A Haskell' implementation should implement the Appendix, and programmers can write programs against it. But we are advertising specifically that we aren't sure, one way or the other, whether FDs will stay in the language for ever I think it's probably too early even to have an Appendix describing ATs. I'd be surprised if the experience of implementing and using them doesn't have impact on their design. The other alternative I can see is to delay the whole process until we know more (a year or two), but I can see that is unattractive. Simon | -Original Message- | From: Simon Peyton-Jones | Sent: 04 May 2006 14:36 | To: [EMAIL PROTECTED] | Cc: Martin Sulzmann; Stephanie Weirich; Ross Paterson; isaac jones; Ravi Nanavati; Andres Loeh; | John Launchbury; Simon Peyton-Jones | Subject: RE: Class System current status | | | I don't think I ever argued that we put ATs in Haskell'. I am arguing | | that we should not put FDs in. | | I think Haskell' MPTC situation is clarifying in my mind as follows | | 1) We definitely want MPTCs | | 2) MPTCs without either FDs or ATs or CHRs are not very useful. | | 3) ATs are shaping up to be a better *programming* notation than FDs, in the same way that FDs are | better than CHRs. This isn't an issue of expressiveness; it concerns ease of inference and ease of | programming. | | 4) However, we have lots of experience of programming with, and implementing FDs; but virtually | none about ATs. The situation might be very different in a year's time, when we have an AT | implementation, and some experience of use. | | | I take (3) to be somewhat controversial. We have little evidence to go on, so far. Nevertheless I'd be | interested to know if (as of today) anyone would positively prefer a language of FDs compared to one | with ATs. | | | All this makes me think that it will be hard to reach a satisfying conclusion in a few months. Perhaps | this isn't the moment to force a conclusion. An alternative might be to punt the whole issue into a | (longer-timescale) Blessed Appendix. (I don't think that the rest of the language depends much on | this, although certain libraries do.) | | Simon ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: Class System current status
Johannes Waldmann wrote: class ( Show p, ToDoc i, Reader b, ToDoc b, Measure p i b ) = Partial p i b | p i - b where ... -- (*) (*) A funny visual aspect of FDs is the absurd syntax. On the left of |, the whitespace is (type arg) application, but on the right, it suddenly denotes sequencing (tupling) I think it's fine. The p i b on the left is effectively a tuple also. It could be a tuple---i.e. the MPTC syntax could be Partial (p,i,b) and it would still make sense. The class declaration syntax is totally screwy anyway. Functional dependencies are constraints, and should be grouped with the typeclass constraints, but instead they're on opposite sides of the head. Plus the = implication is backwards. And the method declarations are also constraints. We oughta have class Partial p i b where Foo p (p,i) - b grok :: p - i - b or class Partial p i b | Foo p, p i - b where grok :: p - i - b or something. But I'm not proposing anything of the sort. I'm in favor of standardizing the syntax we've got. Syntax changes are disruptive, and I don't think they're justified unless they free useful syntax for another use, which this wouldn't. -- Ben ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: Class System current status
Simon Peyton-Jones wrote: My suggestion is this: * Specify MPTCs in the main language * Specify FDs in an Appendix (with some reasonably conservative interpretation of FDs). * A Haskell' implementation should implement the Appendix, and programmers can write programs against it. But we are advertising specifically that we aren't sure, one way or the other, whether FDs will stay in the language for ever Simon, Why is an Appendix is better than just a footnote in the Standard that says we aren't sure, one way or the other, whether FDs will stay in the language for ever. Why do we need this extra structure? I'm worried that this extra structure could be confusing. In particular, if someone says this program is pure Haskell' what will that mean? In practice, will it be clear whether pure Haskell' includes the Appendix? --Stephanie ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: Class System current status
Hi all, Stephanie wrote: Simon, Why is an Appendix is better than just a footnote in the Standard that says we aren't sure, one way or the other, whether FDs will stay in the language for ever. Why do we need this extra structure? I'm worried that this extra structure could be confusing. In particular, if someone says this program is pure Haskell' what will that mean? In practice, will it be clear whether pure Haskell' includes the Appendix? I agree with this. If there is a need to make it clear that some features are particularly likely to change, I can't see why that cannot be achieved in the main body of the report. Through a foot note, or through a highlighted paragraph of some kind. I worry that tearing apart closely related topics is going to be difficult as well as resulting in a confusing and somewhat unstructured report. The appendix idea has also been mentioned in other contexts, specifically for records, and I don't like it there either for the same reasons. Best, /Henrik -- Henrik Nilsson School of Computer Science and Information Technology The University of Nottingham [EMAIL PROTECTED] This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: Class System current status
So it looks like we're stuck at pretty much the same proposals for the class system. a) standardize on MPTC and FDs using rules from CHR paper. b) don't standardize anything, and wait for ATs to take over c) punt---standardize the library and exact form of FD for that library, but no more, or map out some longer timeline for this issue. For a while I thought (a) was the clear choice. The theory has been worked out, we have a lot of experience using them, and key libraries depend on them. However, not everyone is convinced by (a) because of the fear of too early standardization. We may end up with a lot of code that uses a feature that will eventually be deprecated. There are perhaps three counterarguments to this point of view: - We're already in that state. There *is* a lot of Haskell code that uses FDs, it's just not Haskell 98 code. Whenever ATs take over, we'll still have to deal with this code. - It may be that all uses of MPTCs/FDs may be subsumed by ATs, and in fact there is (or will be) some automatic way of translating FD code to AT code. - It may not be all bad for a future Haskell standard to include both ATs and FDs. Certainly more complicated, but I haven't seen any evidence that these features interfere with eachother. Are there any merits to these counterarguments? More generally, our discussion about the class system seems to be stalled. How should we to come to a decision? --- Stephanie ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: Class System current status
On 5/11/06, Stephanie Weirich [EMAIL PROTECTED] wrote: a) standardize on MPTC and FDs using rules from CHR paper. - We're already in that state. There *is* a lot of Haskell code that uses FDs, it's just not Haskell 98 code. Whenever ATs take over, we'll still have to deal with this code. In my opinion, this one holds the greatest weight. The current mass of *useful* and *used* code that is written with and requires FDs is possibly the most important consideration of all. Given that FD *syntax* is well-defined, I see no reason not to standardize it. It remains, however, to decide on what level of *minimum* termination support Haskell' will insist upon. The CHR paper (with the confluence improvements by Claus) is currently the most promising option, and has an implementation (another important consideration) in GHC. -- Taral [EMAIL PROTECTED] You can't prove anything. -- Gödel's Incompetence Theorem ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime