Segmentation faults with ghc-4.02 code

1999-02-19 Thread Meurig Sage
Hi folks, I tried to compile the following program with both ghc-3.02 and ghc-4.02 (pathlevel 1), using the linux glibc binary releases. The 3.02 one works fine but the code produced by 4.02 segmentation faults when I try to run it. It uses a c program, which links to code in tcl-tk v8.0.

Re: Q: Efficiency of Array Implementation

1999-02-19 Thread Jan Laitenberger
Dear Mr. Mechveliani, I thought efficient arrays are impossible in functional language. I'm not sharing this thought... Here is a quote from the Haskell Library Report: \begin{quote} ``Haskell provides indexable arrays, which may be thought of as functions whose domains are

Re: Q: Efficiency of Array Implementation

1999-02-19 Thread S.D.Mechveliani
Concerning 'rapid access' you found in docs - it is hard to believe this access is as fast as in C array - i mean changing X[i] in array X. Because when this change is done fast, it is a side effect, breaks functionality. I always thought that this is the main cost the functional world pays for

Re: Q: Efficiency of Array Implementation

1999-02-19 Thread fis
Date: Fri, 19 Feb 1999 09:41:58 +0100 (MET) From: Lennart Augustsson [EMAIL PROTECTED] CC: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Concerning 'rapid access' you found in docs - it is hard to believe this access is as fast as in C array - i mean changing X[i] in

Re: Haskell-2

1999-02-19 Thread Leon Smith
I'd like to see the numeric class hierarchy re-organized along lines suggested by modern algebra. That is, it should be organized in terms of Groups, Rings, Fields, etc., instead of Integral, Fractional, Real, etc. I have no idea how this should look exactly, so I'll just request it and leave

Lists and FP (was Re: Functions allowing either 0 or 1 parameters?)

1999-02-19 Thread Leon Smith
Don't be shy about using lists when writing Haskell Code. Since Haskell is lazy, lists are often consumed as they are created, so in many cases they do not use extra memory. Lists really are the key to clarity AND efficiency. These definitions are the most efficient of those proposed for the

Re: Haskell 2 -- Dependent types?

1999-02-19 Thread Lennart Augustsson
OK, I'm curious. Two people replied that C++ has undecidable type checking. I was not aware of this (although I can't say I'm too surprised); do you have a reference? It's actually the template processing that can loop, but it is sort of part of the type checking. You can find an article

Re: Haskell 2 -- Dependent types?

1999-02-19 Thread Fergus Henderson
On 18-Feb-1999, Carl R. Witty [EMAIL PROTECTED] wrote: OK, I'm curious. Two people replied that C++ has undecidable type checking. I was not aware of this (although I can't say I'm too surprised); do you have a reference? Not really. I believe this has been mentioned on comp.std.c++, but I

Re: Haskell 2 -- Dependent types?

1999-02-19 Thread Andrew Moran
Lennart Augustsson writes: OK, I'm curious. Two people replied that C++ has undecidable type checking. I was not aware of this (although I can't say I'm too surprised); do you have a reference? It's actually the template processing that can loop, but it is sort of part of the type

how to exploit existential types

1999-02-19 Thread S.D.Mechveliani
Asking on existential types, i wrote It is required to organise a table with the key data K = K1 | K2 | K3 ... to put/extract there the items of different types, say, 'a' and ('a','b') as well. Is this possible? Understanding nothing in this

Re: Lists and FP (was Re: Functions allowing either 0 or 1 parameters?)

1999-02-19 Thread Shin-Cheng Mu
On Fri, 19 Feb 1999 01:19:18 -0500 Leon Smith [EMAIL PROTECTED] wrote: In this particular case, pretty much any Haskell compiler will automatically perform optimizations that will transform the first definition into the second definition. So, the first definition will create the same object

Re: Haskell-2

1999-02-19 Thread Thomas Hallgren
Jose Emilio Labra Gayo wrote: I agree; Haskell 2 should have existential (and universal) types. I also think it should have both extensible records and extensible variants. (See the following paper for more information on these. TREX is an implementation of half of this system; it

RE: Haskell 2 -- Dependent types?

1999-02-19 Thread Nick Kallen
I'm curious: how many people have actually written a program in Cayenne? How many people have written programs that made significant use of the dependent typing? Has anybody tried to teach a programming class using Cayenne? I'll admit to not having yet written something in Cayenne, but I'm

Do Existential Types make Algebraic Types obsolete? (was Re: how to exploit existential types)

1999-02-19 Thread S. Alexander Jacobson
Do existential types makes algebraic types obsolete? I mean there seems to be a large semantic overlap between the two concepts. For example, once you can implement lists with just the product type (,), why bother with algebraic types? Arguably Boolean is a natural algebraic type, but if we

Re: Haskell-2

1999-02-19 Thread Jose Emilio Labra Gayo
I agree; Haskell 2 should have existential (and universal) types. I also think it should have both extensible records and extensible variants. (See the following paper for more information on these. TREX is an implementation of half of this system; it has the extensible records but not