RE: Strange ghc-4.02 TC bug?

1999-02-17 Thread Simon Peyton-Jones
Not a typechecker bug; more a bizarre consequence of overlapping instance decls. The instance decl instance Holidays a = Eq a overlaps with absolutely every other instance decl for Eq. In order to make Lattice (Inv a) an instance of Eq, we have to satisfy Eq (Inv a), since Eq is a

Strange ghc-4.02 TC bug?

1999-02-17 Thread Alex Ferguson
Discern that the following program is apparently well-typed: module M2 where class Eq a = Lattice a where bottom :: a data Inv a = INV a deriving Eq instance Lattice a = Lattice (Inv a) class Holidays a where holCode :: a - Int -- instance Holidays a = Eq a Now,

making 4.02 with 4.01

1999-02-17 Thread S.D.Mechveliani
After applying the *patch* to .../GC.c of ghc-4.02 i start "making" ghc-4.02 from sources with ghc-4.01 - everything - for and under linux, i386. So, myfptools ... ./configure; edit mk/build.mk; make all yields [...] gcc -Iparser -I. -I../includes -O-c parser/ctypes.c -o

RE: specialization with =

1999-02-17 Thread Simon Peyton-Jones
SPECIALIZE with '=' is very desirable. Otherwise, how can one denote with the same name a function together with its particularly efficient specialization? Yes it's desirable. I'm not sure how soon we'll get to it unless other people start yelling too! In general, expect a quiet patch

RE: ghc-4.02 -- space.

1999-02-17 Thread Simon Marlow
Quite impressed with 4.02 so far -- it walks the walks, see promohype elsewhere, why should I give you all too much free advertising? ;-) It does indeed seem to be more go-faster than 3.02, _but_: No profiling! Boo, hiss. Funny space behaviour -- a module I have that contains just one

Re: Haskell 2 -- Dependent types?

1999-02-17 Thread Lennart Augustsson
I'm not sure that anybody has "accepted" undecidable type checking. People using Gofer or C++ seem to have. -- Lennart

Re: Haskell 2 -- Dependent types?

1999-02-17 Thread Lennart Augustsson
2.in the face of the above, we need to give the compiler more guidance. Personally, I favour type declarations everywhere: all identifiers should be introduced as being of a particular specified type. Of course, whether these principles are compatible with Haskell it another

RE: Haskell 2 -- Dependent types?

1999-02-17 Thread D. Tweed
On Wed, 17 Feb 1999, michael abbott wrote: As a C++ user (with a background in categories) patiently waiting for something a lot better, I personally favour two principles: 1.let's go for undecidable type checking. I want the compiler to be able to do as much work as possible: ideally,

Re: A plea for a little Haskell help.

1999-02-17 Thread Fergus Henderson
On 16-Feb-1999, Michael Hobbs [EMAIL PROTECTED] wrote: I'm not sure if this can be cleanly done or not. (I've been able to do it less-than-cleanly.) What I want to do is define a class where the instance has an option of what type of parameters some of its functions can accept. For example,

RE: Haskell 2 -- Dependent types?

1999-02-17 Thread michael abbott
As a C++ user (with a background in categories) patiently waiting for something a lot better, I personally favour two principles: 1. let's go for undecidable type checking. I want the compiler to be able to do as much work as possible: ideally, everything that can be resolved at compile

Re: Haskell 2 -- Dependent types?

1999-02-17 Thread Lars Lundgren
On 16 Feb 1999, Carl R. Witty wrote: Lars Lundgren [EMAIL PROTECTED] writes: We have already accepted undecidable type checking, so why not take a big step forward, and gain expressive power of a new magnitude, by extending the type system to allow dependent types. Wait a

Re: Haskell 2 -- Dependent types?

1999-02-17 Thread Fergus Henderson
On 16-Feb-1999, Carl R. Witty [EMAIL PROTECTED] wrote: I'm not sure that anybody has "accepted" undecidable type checking. I think it's becoming clear by now that the theoretical disadvantages of undecidable type checking are often not significant in practice. Experience with C++, Gofer, ghc,

Re: A plea for a little Haskell help.

1999-02-17 Thread Lennart Augustsson
What's wrong with class Foo a b where write :: a - b - IO () ? Well, it's not Haskell. :-) -- Lennart

XML Haskell (Was: Re: Haskell 2 -- Dependent types?)

1999-02-17 Thread Malcolm Wallace
Alexander Jacobson [EMAIL PROTECTED] writes: * facilitate better integration with other languages/systems For example, it would be nice to be able either to generate a Haskell datatype from an XML DTD or to generate a XML DTD from a Haskell datatype. Funnily enough, that's exactly what

Re: A plea for a little Haskell help.

1999-02-17 Thread Michael Hobbs
Fergus Henderson wrote: On 17-Feb-1999, Lennart Augustsson [EMAIL PROTECTED] wrote: What's wrong with class Foo a b where write :: a - b - IO () ? Well, it's not Haskell. :-) Oh, good point blush. I forgot about that. Please take my mail above as

Re: XML Haskell (Was: Re: Haskell 2 -- Dependent types?)

1999-02-17 Thread Fermin Reig
Alexander Jacobson [EMAIL PROTECTED] writes: * facilitate better integration with other languages/systems For example, it would be nice to be able either to generate a Haskell datatype from an XML DTD or to generate a XML DTD from a Haskell datatype. Funnily enough, that's exactly