Re: Pattern Match Success Changes Types

1998-05-12 Thread Fergus Henderson
On 11-May-1998, Simon L Peyton Jones [EMAIL PROTECTED] wrote: Since GHC keeps the types right through the compiler, it really can't do CSE on two terms of type Either Int Int Either Bool Int even if they are both applications of Right. Actually, GHC does finally discard

Re: C to Haskell

1998-05-12 Thread Simon L Peyton Jones
Greencard allows Haskell to call C (or Corba). Is there a way to give C code access to Haskell functions? GHC does not yet allow this, but we are working hard on H/Direct, a successor to Greencard, that will. It'll also allow you to seal up Haskell programs inside COM objects. Timescale: a

Re: Pattern Match Success Changes Types

1998-05-12 Thread Adrian Hey
Hello, Thanks to everybody who replied on this thread. I'm afraid I've got to go away for a couple of weeks, so I can't join in any more :-( Here are my views on the most recent postings... On Mon 11 May, Jon Mountjoy wrote: -- I would guess 'sometimes'. In

Re: Pattern Match Success Changes Types

1998-05-12 Thread Fergus Henderson
On 12-May-1998, Frank A. Christoph [EMAIL PROTECTED] wrote: With regard to merging Either instances, I agree with Simon that for most programs this will not buy you much, but there are two common kinds of programs where one could expect a significant effect on performance, just because of

Re: C to Haskell

1998-05-12 Thread Malcolm Wallace
Alex asked: Greencard allows Haskell to call C (or Corba). Is there a way to give C code access to Haskell functions? Simon writes: GHC does not yet allow this, but we are working hard on H/Direct, a successor to Greencard, that will. It'll also allow you to seal up Haskell programs

RE: Pattern Match Success Changes Types

1998-05-12 Thread Mariano Suarez Alvarez
On Tue, 12 May 1998, Koen Claessen wrote: Frank A. Christoph wrote: | With regard to merging Either instances, I agree with Simon that for most | programs this will not buy you much, but there are two common kinds of | programs where one could expect a significant effect on performance,

3 AFP

1998-05-12 Thread Luis Soares Barbosa
-- THIRD INTERNATIONAL SUMMER SCHOOL ON A D V A N C E D F U N C T I O N A L P R O G R A M M I N G --

let succ be an Enum class member

1998-05-12 Thread Christian Sievers
Hello, this is about a change in the prelude I'd like to suggest. The following is obviously not what one would expect: Prelude succ 100::Integer Program error: {primIntegerToInt 100} However, with the prelude defining succ to be succ,:: Enum a = a - a

RE: Pattern Match Success Changes Types

1998-05-12 Thread Koen Claessen
On Tue, 12 May 1998, Mariano Suarez Alvarez wrote: | On Tue, 12 May 1998, Koen Claessen wrote: | |map :: (a - b) - [a] - [b] |map f (x:xs) = f x : map f xs |map f xs = xs | | Where is the CSE in theis def of map? Why is it naive? (Hugs ghc define | map on lists exactly

Re: let succ be an Enum class member

1998-05-12 Thread Jeffrey R. Lewis
Christian Sievers wrote: Hello, this is about a change in the prelude I'd like to suggest. The following is obviously not what one would expect: Prelude succ 100::Integer Program error: {primIntegerToInt 100} However, with the prelude defining succ to be succ,

Re: doubles-troubles

1998-05-12 Thread Simon L Peyton Jones
rigid and I belong to the small legion of amateurs who implemented their own math. domain system, Rings, Fields, Modules, etc. This apparently has no chance to be included into the Haskell standard, nobody cares. Standards develop because people who care about particular aspects of them push

Re: let succ be an Enum class member

1998-05-12 Thread Jon . Fairbairn
On 12 May, Jeffrey R. Lewis wrote: I agree, in fact, I'd go one stronger. I'll propose that `fromEnum' and `toEnum' be taken out, since clearly not all enumerable types are subtypes of Int (as you point out, Integer leaps immediately to mind). An alternative would be to return fromEnum and

RE: Pattern Match Success Changes Types

1998-05-12 Thread Adrian Hey
On Tue 12 May, Frank A. Christoph wrote: I'm experiencing a little bout of deja vu here, so excuse me if it turns out that I'm repeating myself. (I could swear I already posted this, but it's not in my "Messages Sent" folder...) With regard to merging Either instances, I agree with Simon