Re: [Haskell-cafe] Begginer question

2005-01-06 Thread Jules Bean
On 6 Jan 2005, at 01:37, Maurício wrote: import Complex; complex_root :: (Float, Float, Float) - (Complex Float, Complex Float) complex_root (a,b,c) = (x1,x2) where { delta = b * b - 4 * a * c :: Float; sqr_delta = if delta = 0 then (sqrt delta) :+ 0 else 0 :+ (sqrt delta) :: (Complex Float);

Re: [Haskell-cafe] Begginer question

2005-01-06 Thread Ketil Malde
Maurício [EMAIL PROTECTED] writes: complex_root :: (Float, Float, Float) - (Complex Float, Complex Float) complex_root (a,b,c) = (x1,x2) where { delta = b * b - 4 * a * c :: Float; sqr_delta = if delta = 0 then (sqrt delta) :+ 0 else 0 :+ (sqrt delta) :: (Complex

RE: [Haskell-cafe] Re: Utility functions

2005-01-06 Thread Simon Marlow
On 30 December 2004 05:25, Philippa Cowderoy wrote: On Wed, 29 Dec 2004, John Goerzen wrote: But like I've said, I am willing to negotiate with people that require code under a license that lets them use it without releasing the code. I have also stated that I will put any part of the code

Re: [Haskell-cafe] Re: Utility functions

2005-01-06 Thread Ketil Malde
Simon Marlow [EMAIL PROTECTED] writes: There are already a couple of bits of (L)GPL under fptools: GMP and readline. GMP we'd like to replace because it is necessarily a part of every compiled Haskell program; readline isn't so important but it would be nice to have a BSD-licensed

RE: [Haskell-cafe] Re: Utility functions

2005-01-06 Thread Simon Marlow
On 06 January 2005 12:20, Ketil Malde wrote: Simon Marlow [EMAIL PROTECTED] writes: There are already a couple of bits of (L)GPL under fptools: GMP and readline. GMP we'd like to replace because it is necessarily a part of every compiled Haskell program; readline isn't so important but it

RE: [Haskell-cafe] Seeking comments on this IO proposal

2005-01-06 Thread Simon Marlow
On 17 December 2004 16:49, John Goerzen wrote: First, if someone were to make a working, useful package out of this, is it likely that it would become the standard (whatever that means) IO system in Haskell anytime in the near future? I ask because I don't want to put a lot of time into

[Haskell-cafe] Re: Begginer question

2005-01-06 Thread Maurício
Ketil Malde wrote: Maurício [EMAIL PROTECTED] writes: (...) Couldn't match `Float' against `Complex Float' Expected type: Float Inferred type: Complex Float In the second argument of `(+)', namely `sqr_delta' In the definition of `x1': x1 = (b + sqr_delta) The error

[Haskell-cafe] Re: Begginer question

2005-01-06 Thread karczma
Maurcio comments the remark of Ketil Malde Note that Haskell doesn't automatically convert arguments for you -- this is a feature. When I type this: * import Complex; a = 3 :+ 4; * and load it into ghci, a + 4 gives me 7.0 :+ 4.0, although a + (4::Float) gives me that error

Re: [Haskell-cafe] Re: Begginer question

2005-01-06 Thread Jules Bean
On 6 Jan 2005, at 14:06, Maurício wrote: * import Complex; a = 3 :+ 4; * and load it into ghci, a + 4 gives me 7.0 :+ 4.0, although a + (4::Float) gives me that error again. Why Haskell converts 4 to Complex but not a Float? The answer lies available to you in ghci: Prelude :t 4 4 ::

Re: [Haskell-cafe] Re: Begginer question

2005-01-06 Thread Henning Thielemann
On Thu, 6 Jan 2005 [EMAIL PROTECTED] wrote: Actually this is not a conversion, but an overloading of numerical constants. The lexical entity 4 behaves as fromInteger 4, and the type checker uses the fromInteger appropriate to the context. Floating, Complex, etc. With 4.0 it will work also

Re: [Haskell-cafe] Some random newbie questions

2005-01-06 Thread David Roundy
On Thu, Jan 06, 2005 at 09:11:13AM -0800, Benjamin Pierce wrote: * As far as I can determine, there is no way to check pattern matches for exhaustiveness. Coming from OCaml, this feels like losing a significant safety net! How do people program so as not to be getting dynamic match

Re: [Haskell-cafe] Some random newbie questions

2005-01-06 Thread Henning Thielemann
On Thu, 6 Jan 2005, Benjamin Pierce wrote: * What are the relative advantages of Hugs and GHC, beyond the obvious (Hugs is smaller and easier for people not named Simon to modify, while GHC is a real compiler and has the most up-to-date hacks to the type checker)? Do people generally

Re: [Haskell-cafe] Some random newbie questions

2005-01-06 Thread Shae Matijs Erisson
Benjamin Pierce [EMAIL PROTECTED] writes: * What are the relative advantages of Hugs and GHC, beyond the obvious (Hugs is smaller and easier for people not named Simon to modify, while GHC is a real compiler and has the most up-to-date hacks to the type checker)? Do people generally

[Haskell-cafe] Re: urls

2005-01-06 Thread Tristan Wibberley
Tristan Wibberley wrote: http://research.microsoft.com/Users/simonpj/papers/assoc-types/index.htm http://www.haskell.org/hawiki/GHC_206_2e4 oops, terribly sorry, was forwarding them to myself but mis-clicked :/ begin:vcard fn:Tristan Wibberley n:Wibberley;Tristan email;internet:[EMAIL PROTECTED]

[Haskell-cafe] The implementation of Functional

2005-01-06 Thread robert dockins
The following discussion occurred last September. Is there any kind of update on any version of this book? - John Meacham writes: I am looking for the book The implementation of Functional Programming languages by S. L. Peyton Jones. This book is

Re: [Haskell-cafe] Some random newbie questions

2005-01-06 Thread Greg Buchholz
Benjamin Pierce wrote: * What are the relative advantages of Hugs and GHC, beyond the obvious (Hugs is smaller and easier for people not named Simon to modify, while GHC is a real compiler and has the most up-to-date hacks to the type checker)? Do people generally use one or the other

[Haskell-cafe] Re: Some random newbie questions

2005-01-06 Thread karczma
A random newbie called (randomly probably) Benjamin Pierce writes: * I wrote a little program for generating Sierpinkski Carpets, and was astonished to find that it runs out of heap under Hugs (with standard settings -- raising the heap size with -h leads to a happier result). ... import

Re: [Haskell-cafe] Some random newbie questions

2005-01-06 Thread Jacob Nelson
On Thu, 6 Jan 2005, Greg Buchholz wrote: As one data point, I don't think SOEGraphics works with GHC or recent versions of Hugs (http://www.haskell.org/soe/graphics.htm). I had trouble with this recently, and a friend of a friend suggested I use the latest GHC from CVS, and import

Re: [Haskell-cafe] The implementation of Functional

2005-01-06 Thread John Meacham
I have all the tiffs but just have not had time to convert them to a pdf appropriate for cafepress to print up. Sorry for the delays. John On Thu, Jan 06, 2005 at 02:21:57PM -0500, robert dockins wrote: The following discussion occurred last September. Is there any kind of update

[Haskell-cafe] Some random newbie questions

2005-01-06 Thread Derek Elkins
OK, I'm taking the plunge and using Haskell in a course I'm teaching this semester. To get ready, I've been doing quite a bit of Haskell programming myself, and this has raised a few questions... * What are the relative advantages of Hugs and GHC, beyond the obvious (Hugs is smaller and

[Haskell-cafe] Hugs vs GHC (again) was: Re: Some random newbie questions

2005-01-06 Thread Dimitry Golubovsky
Hi, Looks like Hugs and GHC are being compared again ;) I am just interested to know, what is the current status of Unicode support in GHC? Hugs has had it for about a year (or more, in CVS) at least at the level of recognizing character categories and simple case conversions based on the