SPJ (and others') book. Was: Pointers in Haskell??
Mark P Jones comments: ... | Simon Peyton-Jones. The implementation of functional | programming languages. Prentice-Hall, 1987 ... | This book is already on-line at | | http://research.microsoft.com/Users/simonpj/Papers/student.ps.gz That's a useful resource too, but it's not the book that the first poster mentioned. The earlier book was more advanced, more research-oriented, and (in most respects) covered more material than the later one (which was intended as an executable tutorial). Personally, I honestly don't think I would have been able to put Gofer together without many hours poring over Simon's 1987 book. Just for the record: this wonderful (really!) book has others authors as well: Philip Wadler, Peter Hancock,... contributed, writing some chapters. Jerzy Karczmarczuk Caen, France PS. The Haskell mailing group received - as you know - an ad: LIL DRIVER GOLF CART The Perfect Holiday Gift for the 3 to 7 year old golfer! Would somebody care writing to those people asking them to correct the name golfer which has a redundant l? ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: instance declarations
Hi Marcin, | There's no solid technical reason for this, but Haskell doesn't allow | it at the moment because there isn't an easy way to name an instance | declaration. | | There is another problem: even if we created a syntax to name them, | if they would not be exported by default then current programs would | have to be changed. You're right of course, although I consider this a pragmatic issue rather than a technical problem: I'm thinking of future languages that are inspired by current Haskell standards but not constrained by details of the current definition or existing codebase. All the best, Mark ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: Pointers in Haskell??
| Simon Peyton-Jones. The implementation of functional | programming languages. Prentice-Hall, 1987 | | is this book could be made available online ? cos on amazon | it seems out of print. I'm planning to scan it in and make the copy available online. In the next month or two. Simon ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: instance declarations
David Feuer [EMAIL PROTECTED] writes: 1. Why can't [instances] be hidden in module imports/exports? The way I see it, an instance declaration is an assertion that a certain data type supports a certain set of operations. Thus, if the data type and the operations on it are in scope, it makes sense for the class instance to be, too. (This leads to the question of why we need to have instance declarations at all :-) (My guesses would be: compiler implementation issues, code clarity, error detection, partially implemented classes)) Problems arise when a data type needs to be instantiated twice in the same class, but with different operator implementations. (I.e. you have a data type which prints differently according to which module you're in) This would, I think, be a problem in most languages, think of deriving a C++ class twice from the same base class while providing different overrides for the functions. I'm not entirely convinced it's an issue that needs a better resolution than the language provides today. (There's a diminishing returns effect when adding language features, and at some point, the increased complexity of the language doesn't make it worth it, IMHO.) 2. Why can't you simultaneously declare a type to be an instance of multiple classes? Why does it matter? class C1 t where a::t-t class C1 t = C2 t where b::t-t instance C1 T, C2 T where a=... b=... To me, it'd make more sense to provide class C1 t where a :: t - t class (C1 t) = C2 t where b :: t - t instance C2 T where a = ... -- implicitly instantiating C1 b = ... and avoid long instantiation chains. But that too is IMHO a minor issue. -kzm -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Pointers in Haskell??
On Mon, Dec 10, 2001 at 12:58:33AM -0800, Simon Peyton-Jones wrote: | Simon Peyton-Jones. The implementation of functional | programming languages. Prentice-Hall, 1987 | | is this book could be made available online ? cos on amazon | it seems out of print. I'm planning to scan it in and make the copy available online. In the next month or two. At long last! Thank you so very much! Thanks, Bill ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: cond and match
Hello! On Sun, Dec 09, 2001 at 01:07:08PM +, Marcin 'Qrczak' Kowalczyk wrote: Fri, 7 Dec 2001 17:12:52 -0500 (EST), David Feuer [EMAIL PROTECTED] pisze: I'm wondering why Haskell doesn't support Scheme-like cond statements or a pattern matching predicate. I agree that both constructs make sense. The main objective is probably that the syntax is already quite rich and this would be another thing to learn and implement. As well, these constructs would reserve two more identifiers and so break quite some existing programs. I could expect that especially match could be used sometimes, like let match = search foo bar in use match somehow Kind regards, Hannah. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: (no subject)
uma kompella wrote: hi i am new to haskell and am having a problem to write function which takes a boolean expression and returns a truthvalue stating whether or not it is a tautology. Can anyone please help me?? Thanks a lot uma I assume this is your homework. It is better to say so explicitly. Think about this: what does it mean for an expression to be a tautology? Can you think of an a way to check this? Once you've come up with a way to check this, it should be quite easy to write it in Haskell. -- /Times-Bold 40 selectfont/n{moveto}def/m{gsave true charpath clip 72 400 n 300 -4 1{dup 160 300 3 -1 roll 0 360 arc 300 div 1 1 sethsbcolor fill}for grestore 0 -60 rmoveto}def 72 500 n(This message has been)m (brought to you by the)m(letter alpha and the number pi.)m(David Feuer) m([EMAIL PROTECTED])m showpage ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: (no subject)
At 2001-12-10 16:07, uma kompella wrote: i am new to haskell and am having a problem to write function which takes a boolean expression and returns a truthvalue stating whether or not it is a tautology. If you really want to impress your tutor, see if you can find a function that does this in polynomial time. -- Ashley Yakeley, Seattle WA ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe