[ ghc-Bugs-1223893 ] Double constant leads to malformed .hc

2005-06-23 Thread SourceForge.net
Bugs item #1223893, was opened at 2005-06-20 04:47 Message generated for change (Settings changed) made by simonmar You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=1223893group_id=8032 Please note that this message will contain a full copy of the comment

[ ghc-Bugs-1226252 ] internal error: EVACUATED object entered!

2005-06-23 Thread SourceForge.net
Bugs item #1226252, was opened at 2005-06-23 16:23 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=1226252group_id=8032 Please note that this message will contain a full copy of

[ ghc-Bugs-1226252 ] internal error: EVACUATED object entered!

2005-06-23 Thread SourceForge.net
Bugs item #1226252, was opened at 2005-06-23 16:23 Message generated for change (Comment added) made by malaire You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=1226252group_id=8032 Please note that this message will contain a full copy of the comment

hierarchical module names

2005-06-23 Thread Serge D. Mechveliani
Who knows, please, where there are explained hierarchical module names? Is this a matter of Haskell-98 or of GHC ? I looked into both of them (and also a bit into [EMAIL PROTECTED]) but could not find a basic explanation of the point, somehow missed. Suppose that my user package called

unofficial pre-6.4.1 snapshot build for x86-64 linux

2005-06-23 Thread Jens Petersen
I build a recent 6.4 stable branch snapshot on Linux/x86-64 (ie amd64) today. Since several people expressed interest in it I just uploaded it as binary dist tarball to: http://haskell.org/~petersen/ghc-6.4.1.20050620-x86_64-unknown-linux.tar.gz I'm happy to say with this gtk2hs now

Re: GHC 6.2.2 Compile problem on Mac OS X 10.4

2005-06-23 Thread Wolfgang Thaller
Hi, I am trying to make an unregisterised build. As my host machine, i use a Mac running Mac OS X 10.4. When building ghc 6.2.2 on the host machine (also running GHC 6.2.2), i get the error attached below when doing 'make all' in ghc/. Does anyone have an idea how to solve this ? thanks,

Re: Faster IO

2005-06-23 Thread Benedikt Huber
Jim Apple wrote: I'm having an IO speed problem. I need to input a long string of known length and process it with a foldl. getLine and foldl take way too long; is there a known faster way? Use hGetContents and fold', the strict version of fold (It then takes about 70 seconds to sum 18 megs of

Re[2]: [Haskell] Dynamic binding

2005-06-23 Thread Bulat Ziganshin
Hello Andrew, Thursday, June 23, 2005, 5:38:03 AM, you wrote: AW To handle the problem of drawing all shapes, in c++, I would have a list AW of shape pointers: AW struct shape{ virtual void draw(...);}; AW struct circle : public shape {...}; AW struct square : public shape {...}; AW

RE: Re[2]: [Haskell] Dynamic binding

2005-06-23 Thread Ralf Lammel
Bulat, Bulat wrote: just create list of draw functions itself: [drawCircle (10,10) 5, drawSquare (20,20) 10] No! the exercise is about lists of shapes not lists of results of drawing shapes. This is clearly a major difference. Bulat wrote: for more complex tasks - declare interface as a

Re: Re[2]: [Haskell] Dynamic binding

2005-06-23 Thread ajb
G'day all. Thursday, June 23, 2005, 5:38:03 AM, you wrote: To handle the problem of drawing all shapes, in c++, I would have a list of shape pointers: struct shape{ virtual void draw(...);}; struct circle : public shape {...}; struct square : public shape {...}; std::listshape * shapes;

RE: Re[2]: [Haskell] Dynamic binding

2005-06-23 Thread Ralf Lammel
Andrew, you are circumventing the hard problem! (Even though I am sure you just forgot to mention it.) That is, the question is about drawing a *list* of shapes. As correctly observed by Rathman ages back, one naturally ends up with existential quantification when simulating dynamic binding.

Re: [Haskell] Dynamic binding

2005-06-23 Thread Andreas Rossberg
Andrew Ward wrote: In Simon Thompson's The Craft of Functional Programming Second Edition, page 226, it is mentioned that Laufer (1996) describes a Haskell extension to allow dynamic binding. I was wondering if this has been implemented as an extension in any of the haskell compilers, or

[Haskell] rfc: package mounting

2005-06-23 Thread Frederik Eaton
Hi all, It looks like there's been a bit of recent discussion regarding module and package namespaces. There is a certain possible design feature that I don't think has been mentioned yet, that I think would be very helpful, so I thought I should at least bring it up. What I want is to be able

RE: [Haskell] Dynamic binding

2005-06-23 Thread Ralf Lammel
Andreas Rossberg: Andreas R. wrote: dynamic binding is just the OOO way of saying calling a first-class function). Let me presume that dynamic binding was meant here in the sense of late binding, in the sense of subtyping polymorphism. At least, the given shapes example strongly suggested

Re: [Haskell] Dynamic binding

2005-06-23 Thread Jan-Willem Maessen
On Jun 22, 2005, at 9:38 PM, Andrew Ward wrote: Pal-Kristian Engstad wrote: On Wednesday 22 June 2005 05:38 pm, Andrew Ward wrote: What would be the normal way for a Haskell programmer to handle the typical shape example in beginner OO tutorials? By not doing OO. You have to ask yourself,

Re: [Haskell] Dynamic binding

2005-06-23 Thread Andreas Rossberg
Ralf Lammel wrote: dynamic binding is just the OOO way of saying calling a first-class function). Let me presume that dynamic binding was meant here in the sense of late binding Yes. in the sense of subtyping polymorphism. No, as far as I read it, dynamic or late binding is orthogonal

Re: [Haskell] Dynamic binding

2005-06-23 Thread Lennart Augustsson
Andrew Ward wrote: Hi All, In Simon Thompson's The Craft of Functional Programming Second Edition, page 226, it is mentioned that Laufer (1996) describes a Haskell extension to allow dynamic binding. I was wondering if this has been implemented as an extension in any of the haskell compilers,

RE: [Haskell] Dynamic binding

2005-06-23 Thread Ralf Lammel
Lennart, from a textbook perspective I agree that this solution should be mentioned to make it easy for non-Haskellers to get into the subject. However (as you of course know, but I just don't understand why you don't dare to mention the limitations a) and b) ...) a) Your constructor-based

Re: [Haskell] rfc: package mounting

2005-06-23 Thread Stefan Karrmann
My two cents: In Coq, cf. http://pauillac.inria.fr/coq/doc8/main.html chapter 2.5.1 (Names of libraries and files), there is something similar: Add LoadPath physical_path as dirpath. E.g.: Add LoadPath /home/sk/lib/foo as Foo. Frederik Eaton (Thu, Jun 23, 2005 at 02:14:00AM -0700): Hi all,

Re: [Haskell] Dynamic binding

2005-06-23 Thread Lennart Augustsson
Yes, a) is a weakness, but usually I don't find it too restrictive. I agree that extensible data types would be a very interesting addition to Haskell, and I'd like to have it. But the original question was how to do it in Haskell, and when I hear Haskell i think Haskell-98 since it's the only

[Haskell] 7th GPCE Young Researchers Workshop Deadline: June 30, 2005

2005-06-23 Thread GPCE YRW Organizers
[apologies for multiple copies] 7th GPCE Young Researchers Workshop 2005 In conjunction with

[Haskell] FACS'05: Second Call for Papers

2005-06-23 Thread Luis Barbosa
[apologies for cross-posting] - SECOND CALL FOR PAPERS FACS'05 II International Workshop on Formal Aspects of Component Software Macao October 24-25, 2005

Re: [Haskell] Dynamic binding

2005-06-23 Thread Pal-Kristian Engstad
On Wednesday 22 June 2005 06:38 pm, Andrew Ward wrote: % This general pattern of dynamic binding I use over and over again. Could % you give me some example code of this type of thing handled in Haskell's % way? Assuming that the number of classes deriving from shape might get % quite large. What

Re: [Haskell-cafe] Noob error: Type b - c b Does not match IO a

2005-06-23 Thread Sebastian Sylvan
On 6/23/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: getList = do putStrLn Give me a number (or 0 to stop): numString - getLine let num = read numString if num == 0 then return [] else return (num:getList) This will give you an error as well. 'num' is of type

[Haskell-cafe] Re: Using type classes for polymorphism of data constructors

2005-06-23 Thread Thomas Sutton
On 11/06/2005, at 11:18 PM, Thomas Sutton wrote: In Java (C#, Python, etc) I'd do this by writing an interface Formula and have a bunch of abstract classes (PropositionalFormula, ModalFormula, PredicateFormula, etc) implement this interface, then extend them into the connective classes

RE: [Haskell-cafe] Re: Using type classes for polymorphism of dataconstructors

2005-06-23 Thread Ralf Lammel
Thomas Sutton wrote: Main :t (Impl (Prop p) (Poss (Prop p)))-- p - p Impl (Prop p) (Poss (Prop p)) :: PC So the type says that this is a formula in the predicate calculus? (Even though you combine two formulae of modal logics.) Are you happy with that? Just wondering? Also, are you

[Haskell-cafe] Re[4]: [Haskell] Dynamic binding

2005-06-23 Thread Bulat Ziganshin
Hello Ralf, Thursday, June 23, 2005, 11:36:20 AM, you wrote: just create list of draw functions itself: [drawCircle (10,10) 5, drawSquare (20,20) 10] RL No! the exercise is about lists of shapes RL not lists of results of drawing shapes. RL This is clearly a major difference. in cases

Re: [Haskell-cafe] Re[4]: [Haskell] Dynamic binding

2005-06-23 Thread Keean Schupke
Interestingly this is exactly the approach taken in the OOHaskell paper! The difference is we used extensible records with subtyping (from the HList paper) to implement inheritance and overloading, which you cannot do with ordinary Haskell records. So you statment that it is better to do it in

[Haskell-cafe] type inference and named fields

2005-06-23 Thread Malcolm Wallace
I have discovered something I believe to be a problem in Haskell'98, although it is not a simple bug as such - it has more of the flavour of an unintended mismatch in the interaction of two separate features. Since Haskell is deeply principled language, a feature conflict is extremely rare, and so

Re: [Haskell-cafe] type inference and named fields

2005-06-23 Thread Lennart Augustsson
A somewhat similar problem exists even without fields: foo :: Either a b - Either () b foo (Left _) = Left () foo x@(Right _) = x Since Haskell type checking doesn't use the information gained by pattern matching to refine types we just have to accept that some perfectly safe programs don't

Re: [Haskell-cafe] type inference and named fields

2005-06-23 Thread Jacques Carette
I was under the impression that, in ghc 6.4 at least, GADTs did just that: use information gained by matching on the type constructor to refine types. I sort-of expected that the extension to pattern matching would follow. Or is that a nice paper waiting to be written? Jacques Lennart

Re: [Haskell-cafe] type inference and named fields

2005-06-23 Thread Henning Thielemann
On Thu, 23 Jun 2005, Lennart Augustsson wrote: A somewhat similar problem exists even without fields: foo :: Either a b - Either () b foo (Left _) = Left () foo x@(Right _) = x Since Haskell type checking doesn't use the information gained by pattern matching to refine types we just have

Re: [Haskell-cafe] type inference and named fields

2005-06-23 Thread Henning Thielemann
On Thu, 23 Jun 2005, Malcolm Wallace wrote: module Fieldbug where data Fields a = VariantWithTwo { field1 :: a , field2 :: a } | VariantWithOne { field1 :: a } The key point here is that the data structure with named fields has more than one constructor, and

[Haskell-cafe] RE: [Haskell] Dynamic binding

2005-06-23 Thread Ralf Lammel
Andreas Rossberg said: [Followups to Haskell Cafe] as far as I read it, dynamic or late binding is orthogonal to subtyping, or typing in general. It is just that most typed OO languages lump these concepts together. Absolutely agreed. Often a simple first-class function, or a record

Re: [Haskell-cafe] type inference and named fields

2005-06-23 Thread Christian Maeder
Malcolm Wallace wrote: voidcast :: Fields a - Fields Void voidcast v@(VariantWithTwo{}) = v { field1 = Void , field2 = Void } voidcast v@(VariantWithOne{}) = v { field1 = Void } I would not expect that updating only field1 can change the type of v. The right thing is to construct a new value.

Re: [Haskell-cafe] type inference and named fields

2005-06-23 Thread Henning Thielemann
On Thu, 23 Jun 2005, Christian Maeder wrote: Malcolm Wallace wrote: voidcast :: Fields a - Fields Void voidcast v@(VariantWithTwo{}) = v { field1 = Void , field2 = Void } voidcast v@(VariantWithOne{}) = v { field1 = Void } I would not expect that updating only field1 can change the type of

[Haskell-cafe] RE: Re[4]: [Haskell] Dynamic binding

2005-06-23 Thread Ralf Lammel
Bulat, a) building (i) a list of data is fundamentally different from building (ii) a list of anticipated results of each datum. I would be surprised to hear that this counts as a valid technique. BTW, you can do the *same* in a lazy OO language. (No lazy OO language at hand -- well lazyness can

Re: [Haskell-cafe] type inference and named fields

2005-06-23 Thread Jonathan Cast
Lennart Augustsson [EMAIL PROTECTED] wrote: A somewhat similar problem exists even without fields: foo :: Either a b - Either () b foo (Left _) = Left () foo x@(Right _) = x Since Haskell type checking doesn't use the information gained by pattern matching to refine types we just have to

Re: [Haskell-cafe] type inference and named fields

2005-06-23 Thread Tomasz Zielonka
On Thu, Jun 23, 2005 at 09:08:12PM +0200, Christian Maeder wrote: Malcolm Wallace wrote: voidcast :: Fields a - Fields Void voidcast v@(VariantWithTwo{}) = v { field1 = Void , field2 = Void } voidcast v@(VariantWithOne{}) = v { field1 = Void } I would not expect that updating only field1

Re: [Haskell-cafe] type inference and named fields

2005-06-23 Thread Lennart Augustsson
It's true that GADTs does just that. But only if you use them. And they are not part of Haskell. :) -- Lennart Jacques Carette wrote: I was under the impression that, in ghc 6.4 at least, GADTs did just that: use information gained by matching on the type constructor to refine types.

Re: [Haskell-cafe] type inference and named fields

2005-06-23 Thread Lennart Augustsson
Jonathan Cast wrote: Lennart Augustsson [EMAIL PROTECTED] wrote: A somewhat similar problem exists even without fields: foo :: Either a b - Either () b foo (Left _) = Left () foo x@(Right _) = x Since Haskell type checking doesn't use the information gained by pattern matching to refine