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);
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
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
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
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
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
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
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
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 ::
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
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
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
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
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]
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
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
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
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
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
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
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
21 matches
Mail list logo