RE: WordPtr,IntPtr,IntMax,WordMax
On 12 May 2006 00:47, John Meacham wrote: On Thu, May 11, 2006 at 02:57:30PM +0100, Simon Marlow wrote: On the other hand, keeping intermediate Doubles to 80-bit precision is both (a) non-portable and (b) unpredictable (the programmer doesn't know which intermediates are going to be stored in 80 bits, and turning on optimisation will probably make a difference). Indeed, not storing the intermediate values as 80 bits is one of the 'nicer' things I was refering to. :) though, this does bring up another standardish C type we should support __float128 and __complex as pointed out by Aaron. any idea what would be a good module to export them from? How standard are these? Foreign.C.Types is the obvious place, but it wouldn't be a good idea for that module to contain optional parts of its interface. Cheers, Simon ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: WordPtr,IntPtr,IntMax,WordMax
simonmar: On 12 May 2006 00:47, John Meacham wrote: On Thu, May 11, 2006 at 02:57:30PM +0100, Simon Marlow wrote: On the other hand, keeping intermediate Doubles to 80-bit precision is both (a) non-portable and (b) unpredictable (the programmer doesn't know which intermediates are going to be stored in 80 bits, and turning on optimisation will probably make a difference). Indeed, not storing the intermediate values as 80 bits is one of the 'nicer' things I was refering to. :) though, this does bring up another standardish C type we should support __float128 and __complex as pointed out by Aaron. any idea what would be a good module to export them from? How standard are these? Foreign.C.Types is the obvious place, but it wouldn't be a good idea for that module to contain optional parts of its interface. Especially since even: checking Haskell type for intmax_t... not supported checking Haskell type for uintmax_t... not supported aren't universal :) -- Don ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: WordPtr,IntPtr,IntMax,WordMax
On Fri, May 12, 2006 at 10:19:18AM +0100, Simon Marlow wrote: Especially since even: checking Haskell type for intmax_t... not supported checking Haskell type for uintmax_t... not supported aren't universal :) Well, yes. Any suggestions for what to do here? Make a best guess? What is the problem here? are intmax_t and uintmax_t not on all systems? there is a handy autoconf macro that generates an appropriate ISO compliant inttypes.h if one doesn't exist on a system. John -- John Meacham - ⑆repetae.net⑆john⑈ ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re: WordPtr,IntPtr,IntMax,WordMax
john: On Fri, May 12, 2006 at 10:19:18AM +0100, Simon Marlow wrote: Especially since even: checking Haskell type for intmax_t... not supported checking Haskell type for uintmax_t... not supported aren't universal :) Well, yes. Any suggestions for what to do here? Make a best guess? What is the problem here? are intmax_t and uintmax_t not on all systems? Well, not on OpenBSD at least. So that probably means not on Solaris or Irix or AIX either. there is a handy autoconf macro that generates an appropriate ISO compliant inttypes.h if one doesn't exist on a system. Ah, now that sounds like a solution. -- Don ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org//mailman/listinfo/haskell-prime
Re[2]: Class System current status
Hello Stephanie, Thursday, May 11, 2006, 5:45:15 PM, you wrote: - 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. that is really important is that CLIENTS of these libraries don't need to be changed - 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. i think that is not necessary considering that i said above - 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. language should be orthogonal, i.e. include only one way to implement each feature. otherwise, it becomes too large 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? i think the same - goal of discussion should be developing of proposal/proposals in this area for Haskell' committee. any other directions of discussion, while very important for future of Haskell language, should be somewhat limited or moved to cafe list. i propose the following structure of discussions: 1. initial proposal 2. critique 3. correction of proposal and going to 2nd step 4. final proposal or abandoning this proposal making several concurrent proposals on the same topic would be great because concurrency motivates to make better things and because ideas can be easily borrowed by proposals from each other -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ 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[2]: Class System current status
Hello Johannes, Friday, May 12, 2006, 4:18:29 PM, you wrote: = 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 also don't like this - it's really confusing. p,i-b will be better approach -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ 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[2]: Class System current status
Hello Simon, Friday, May 12, 2006, 8:05:25 PM, you 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 i agree with that and even feel that this proposal reflect viewpoint of most of us (of course, i may be wrong). moreover, my own proposal is essentially the same, only from practical viewpoint - use FDs today but be ready to reimplement these libs several years later using some new extension. so the developer will decide whether he prefer to have maximum features or maximum compatibility moreover, i think that idea of Appendixes can be used to allow many other extensions be somewhat standard but not required in each and every compiler. this includes GADT, concurrency, TH, TRex and many other things -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ 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