How much MB do I need
To compile a large Haskell program. I am compiling at the moment without optimization and 55 MB of heap. Still ghc complains that the heap is too small. Any suggestions? Marc van Dongen [EMAIL PROTECTED]
Re: More on randoms
Jerzy Karczmarczuk ([EMAIL PROTECTED]) wrote: [...] : the Haskell standard libraries offer only the basic integer RNG, : which will force all the users to reconstruct the needed reals, : this is not extremely painful, but anyway. : I would love having 'next' returning reals as well... : And vectors (with decently uncorrelated elements). Etc. Yes please. But do change the word vector into [Integer]. [...] Regards, Marc van Dongen
Re: Q: Library for (efficient:-) join and projection
Hi Tom, : Hi Marc. : : The Haskell type system can't express a polymorphic natural join. I can understand that. : Even the Trex extension to Hugs doesn't quite manage it. That's why : I'm keen on a further extension: symmetric record catenation. :-) What I need (and I hacked a quick and dirty version) is something with the following functionality: data Table variable value = Table [variable] [[value]] naturalJoin :: (Ord a,Ord b) = Table a b - Table a b - Table a b projection :: (Ord a,Ord b) = Table a b - [a] - Table a b : Also, the attached message may be relevant. Thanks! [...] Regards, Marc van Dongen
Q: Library for (efficient:-) join and projection
Dear group, I don't want to reinvent this wheel and was wondering if anybody knows of a publicly available library with functions allowing for the creation of tables, the computation of natural joins and projections of these tables (and possibly more). Any pointer will be greatly appreciated. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 4903578 University College Cork, NUIC | Fax:+353 21 4903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
Ratio: (-1:%1) (-1:%1)?
Dear group, Maybe others have mentioned this as well but I can't recall having seen this anywhere. I am not quite sure how to express this in Haskell terms but here it goes anyway: Why is :% in Ratio not hidden? By allowing a user program to construct elements of the form (a:%b) one can create objects which lead to inconsistencies if each of the following hold: (1) for all a: not (a a); (2) for all a, b and c: if a b and b c then a c. (3) for all a: if a = b and b = a then a == b Now Ratio defines (=) and () as (x:%y) = (x':%y') = x * y' = x' * y (x:%y) (x':%y') = x * y' x' * y According to these definitions and using pseudo notation the following must hold: (-1:%1) (0:%1) (1:%-1) == (-1:%1), The last equality follows from (3) and the fact that: (1:%-1) = (-1:%1) and (-1:%1) = (1:%-1). Using (2) it now follows that (-1:%1) (-1:%1) which according to (1) should not be true. According to the language definition (1:%-1) != (-1:%1). Personally I think that built-in data types should obey (1), (2) and (3). Maybe I am missing something. Any comments? Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 4903578 University College Cork, NUIC | Fax:+353 21 4903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
Re: Ratio: (-1:%1) (-1:%1)?
Jerzy Karczmarczuk ([EMAIL PROTECTED]) wrote: [...] : First of all: at least in Hugs (:%) is *not* exported by : the Prelude. : : So, it is hidden, and a sane, well educated gentleman would : not procreate a fraction with negative denominator. That is the point I am trying to make. Not all people are gentle. Another thing is that gentlemen normally ensure a gcd of 1 for numerator and denominator. The definition of (*) in the Prelude has to be clumsy because it cannot assume that this will the case because users can construct their own Ratios. : The form (1:%-1) is an abomination. Perhaps less than (1:%0), : but anyway. But how to have a low-level efficiency and a : direct access to data structures, and the respect of all : mathematic constraints? In principle we could have a polar : representation of complexes: (r,theta), and somebody really : funny could put a negative r inside. I haven't looked at that. But if it is not the intended way to use these things at least it should be documented. : And then somebody really sad would cry that (r,theta) is equal : but not really, to (r,theta+2PI). But they are equal. However, see my previous point about documentation. [...] Regards, Marc -- Marc van Dongen, CS Dept | phone: +353 21 4903578 University College Cork, NUIC | Fax:+353 21 4903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
Re: Ratio: (-1:%1) (-1:%1)?
Lennart Augustsson ([EMAIL PROTECTED]) wrote: : I am not quite sure how to express this in Haskell : terms but here it goes anyway: Why is :% in Ratio : not hidden? : What?!? Of course :% is hidden. It's always been hidden. : If it isn't it's a bug in your implementation or a (new) bug : in the repotr. It's always been hidden before; exposing it would : be a grave error. Hmm. I must have missed something. My hugs (1.4) allows it. I was assuming that Haskell did allow it. As it turns out my latest ghc doesn't. That's cool. Thanks. Sorry for the confusion. Regards, Marc
Re: Ratio: (-1:%1) (-1:%1)?
D. Tweed ([EMAIL PROTECTED]) wrote: : If you haven't loaded any modules then hugs is in `module scope' of : prelude and it's possible. If you do, eg, :l List then you end up in that : module scope and it's no longer allowed. That's exactly what happend. I ran hugs and typed in (1:?2). I was just trying to find out why a module with :%'s in it was not accepted by hugs. Thanks for the explanation. Regards, Marc
Re: Ratio: (-1:%1) (-1:%1)?
Lennart Augustsson ([EMAIL PROTECTED]) wrote: : The definition : of (*) in the Prelude has to be clumsy because it cannot : assume that this will the case because users can construct : their own Ratios. : How can a user create his own Ratio? The % operation does the : GCD reduction, as does every other operation that creates a Ratio. It is not possible. As I replied before but you may not have received it yet, I was wrong in assuming that one could use :%. Again, sorry about the confusion. Regards, Marc van Dongen
Re: ServiceShow class for messages
S.D.Mechveliani ([EMAIL PROTECTED]) wrote: [ error messages printing their aguments ] Printing the argument of a function as part of an error message may lead to infinite error messages. It may even lead to several calls to error which all have to be shown. I don't think a compiler will ever be able to detect such infinite situations and should therefore not be allowed to automatically print arguments because the quality of the messages will be very bad. Also I just looked up the following in the language definition: A call to error terminates execution of the program and returns an appropriate error indication to the operating system. It should also display the string in some system-dependent manner. When undefined is used, the error message is created by the compiler. This suggests that a call to error should result in termination. Perhaps I am missing something. Regards, Marc
Re: Type signatures in instance declarations?
George Russell ([EMAIL PROTECTED]) wrote: : Why are these illegal? I appreciate that they can't give useful information : to the compiler, which knows the type already from the class, but in my : opinion they are still useful to the maintainer, because they serve as : a reminder of the type. : I agree. I posted a similar comment one or two years ago. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
Re: Type signatures in instance declarations?
Koen Claessen ([EMAIL PROTECTED]) wrote: [snip] : * Why can one not have a type declarion in the export : list of a module? Common practice for many people : is to put these types in comments now (which is really : dangerous, since the types might change but not the : comments). I would love to see type signatures in export lists. It may also allow you to export a function implemented with a universal type signature for a certain specific type. module Foo( same :: Int - Int - Bool ) where same :: a - a - Bool same = (==) Regards, Marc
Re: libraries for Integer
George Russell ([EMAIL PROTECTED]) wrote: : I agree actually. Integer only needs to be an implementation of : multiprecision arithmetic; we shouldn't tie it to GMP. There are : other multiprecision arithmetic packages out there, for example But it is pretty fast. : the LIP package included in NTL :http://www.shoup.net/ntl/ Do you have any data about comparisons with this or other packages? Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
Re: libraries for Integer
George Russell ([EMAIL PROTECTED]) wrote: [...] : Sorry I can't be more helpful. But there is unlikely to be a simple : answer to the question "Does LIP or GMP multiply numbers fastest?"; : it will depend on how big the numbers are, what platform you are using, : and how much difficult the interface is to use. (GMP is faster if Thanks anyway. [...] Regards, Marc
Re: doubly linked list
Jerzy Karczmarczuk ([EMAIL PROTECTED]) wrote: : But in Haskell, where the beasts are not mutable: : : ... Actually, has anybody really used them for practical purposes? I have used doubly linked lists in Haskell about four years ago to implement a queue from which objects could be added at front/back and deleted anywhere. A mutable array was used to see if objects were in the queue. If they were then (Just Ix) to them would be returned and if they weren't Nothing. The index could then be used to find the possible previous and next elements in the queue and change their representations. I cheated a bit because I used the fact that the possible indices were know in advance so that I could use an array to represent the member in the queue as well. It worked well. I've appended (what I think are the most important) code-fragments at the end. I don't know if I would do it the same way again; this was years ago. Regards, Marc van Dongen initQueue :: Ix i = (LinkedList s i v) - [(i,v)] - ST s (Maybe i,Maybe i) initQueue _ [] = return (Nothing,Nothing) initQueue marks ((i,v):ivs) = writeArray marks i (Nothing,Nothing,Just v) a2q marks i i ivs addToQueue :: Ix i = (LinkedList s i v) - (Maybe i) - (Maybe i) - [(i,v)] - ST s (Maybe i,Maybe i) addToQueue marks fst lst [] = return (fst,lst) addToQueue marks Nothing_ ijrs = initQueue marks ijrs addToQueue marks (Just fst) (Just lst) ijrs = a2q marks fst lst ijrs a2q :: Ix i = (LinkedList s i v) - i - i - [(i,v)] - ST s (Maybe i,Maybe i) a2q _ fst lst [] = return (Just fst,Just lst) a2q marks fst lst ((i,v):ivs) = readArray marks i = \(_,_,mbv) - case mbv of Nothing - readArray marks lst = \(jpred,_,jv) - writeArray marks lst (jpred,Just i,jv) writeArray marks i (Just lst,Nothing,Just v) a2q marks fst i ivs _ - a2q marks fst lst ivs delFromQueue :: Ix i = (LinkedList s i v) - (Maybe i) - (Maybe i) - [i] - ST s (Maybe i,Maybe i) delFromQueue _ jfstjlst[] = return (jfst,jlst) delFromQueue marks jfst@(Just fst) jlst@(Just lst) (i:is) = readArray marks i = \(jpred,jsucc,_) - writeArray marks i (Nothing,Nothing,Nothing) case jpred of Nothing - case jsucc of Nothing - return (Nothing,Nothing) (Just s) - readArray marks s = \(_,s',r') - writeArray marks s (Nothing,s',r') delFromQueue marks jsucc jlst is (Just p) - case jsucc of Nothing - readArray marks p = \(p',_,r') - writeArray marks p (p',Nothing,r') delFromQueue marks jfst jpred is (Just s) - readArray marks p = \(p',_,r') - writeArray marks p (p',jsucc,r') readArray marks s = \(_,s',r') - writeArray marks s (jpred,s',r') delFromQueue marks jfst jlst is
Re: basAlgPropos. Why sample argument
Fergus Henderson ([EMAIL PROTECTED]) wrote: [snip] :* `zero x' fits the aim of implicit dynamic domains. : : This one is much more interesting. I am not sure if I understand this but I also used zero :: a - a to create polynopmials as opposed to a function zero :: a The application zero p created a zero polynomial with certain ``built-in'' properties like a term-order it inherited from p. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 4903578 University College Cork, NUIC | Fax:+353 21 4903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
Re: sample argument. Dongen's example
S.D.Mechveliani ([EMAIL PROTECTED]) wrote: : I wrote to list, and you reply privately. Ooops. I thought I group replied. I'll forward to the list. : I think that it is good for the list to know that someone else : appreciates the need of dynamic parameters in domain ... Which is why I decided to add something to the discussion. : But I an dumb at your or constant :: a - c - : : For example, zero (2,3) = (0,0) gives zero for Int x Int. : And how to use `constant' ? Say you have a constant c in some ring k and you want to lift it (I think that's the proper term) to the polynomial ring k[X] then you can if you have a polynomial, say p, in k[X] already. Just use: constant p c. Regards, Marc -- Marc van Dongen, CS Dept | phone: +353 21 4903578 University College Cork, NUIC | Fax:+353 21 4903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
[dongen@cs.ucc.ie: Re: sample argument. Dongen's example]
Sorry about this. I thought I group replied when replied Sergey's e-mail. -- Marc van Dongen, CS Dept | phone: +353 21 4903578 University College Cork, NUIC | Fax:+353 21 4903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED] - Forwarded message from Marc van Dongen [EMAIL PROTECTED] - Date: Mon, 8 May 2000 11:14:03 +0100 From: Marc van Dongen [EMAIL PROTECTED] To: "S.D.Mechveliani" [EMAIL PROTECTED] Subject: Re: sample argument. Dongen's example X-Mailer: Mutt 1.0.1i In-Reply-To: [EMAIL PROTECTED]; from [EMAIL PROTECTED] on Mon, May 08, 2000 at 01:16:09PM +0400 S.D.Mechveliani ([EMAIL PROTECTED]) wrote: : Looks like it uses the sample argument. This p contains the : parameters that describe a polynomial domain P = c[x1..xn]. : Different ways to order the monomial set, different lists of : "variables" may mean different domains inside the *same type*. : If p contains variables ["x"], p' contains ["x","y"], : then zero p and zero p' : : have to be zeroes of very different domains corresponding to : p, p' :: a. : If you rely on the features like this, this is the very sample : argument approach. : Do you mean this? No. I meant that I didn't understand the second sentence above the one where I started my reply:-) : Classic Haskell approach: : - [] : Besides several technical hindrances of mathematical nature, it : puts certain principal restriction. : It prohibits all the mathematical practice of dynamic change of : orderings, variable lists, residue domains for different base, : generally - dynamic change of computation domain given by : *parameter*. Exactly. This has been a *great* pain in the neck for me when writing operations on polynomials using standard notation which alowed for the hiding of the additional information needed to implement fast algorithms. [...] : I suggest now zero :: a - a or constant :: a - c - Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 4903578 University College Cork, NUIC | Fax:+353 21 4903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED] - End forwarded message -
Re: sample argument. Dongen's example
S.D.Mechveliani ([EMAIL PROTECTED]) wrote: [I cc'd this to haskell as well] : this is exactly the Domain conversion proposal, described in : basAlgPropos. class Cast a b where cast :: a - b - a. : The first argument is the sample for domain. The second casts to : `a' after the given sample. For example cast (x^2+y (in Z[x,y)) 2 : maps 2 to polynomial in x,y : - if the instance Cast (Pol ..) Integer : is defined. I knew you must have had something to obtain a similar functionality this as well. It is needed. Regards, Marc
Re: static evaluation of dynamics thing
Simon Peyton Jones ([EMAIL PROTECTED]) wrote: [static] : said, some functions are legitimately bottom. But think about assertions: : : f x = assert (p x) (...x...) : : where assert :: Bool - a - a I like that. Also I would like a assertAndBelieveMe which could be used to as in: quot' a b | assertAndBelieveMe (b /= 0) = quot a b So that a special version of quot could be used which would not check for b == 0. : Life is short. Are these features that would be useful to lots of people? Yes please. Regards, Marc van Dongen
Prelude in LaTeX
Hello all, Is there anybody who knows where to find the Prelude typeset in Manuel Chakravarty's haskell.sty? Thanks in advance for any replies. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 4903578 University College Cork, NUIC | Fax:+353 21 4903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
Re: Group theory
Eric Allen Wohlstadter ([EMAIL PROTECTED]) wrote: : Are there any Haskell libraries or programs related to group theory? I am : taking a class and it seems like Haskell would be a good programming : language for exploring/reasoning about group theory. What I had in mind : was perhaps you could have a function which takes a list(set) and a : function with two arguments(binary operator) and checks to see whether or : not it is a group. I think it might be a fun exercies to write myself but : I'd like to see if it's already been done or what you guys think about it. I think Sergey Mechveliani's docon (algebraic DOmain CONstructor) has facilities for that. Have a look at: http://www.cs.bell-labs.com/who/wadler/realworld/docon.html Regards, Marc van Dongen ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: `Covertible' class. Reply.
S.D.Mechveliani ([EMAIL PROTECTED]) wrote: [snip] : The basic algebra library BAL : http://www.botik.ru/pub/local/Mechveliani/basAlgPropos/bal-pre-0.01/ : : suggests class Cast a b where cast :: a - b - a I just want to add that this is almost similar to a mechanism I've implemented. You really need this. Regards, Marc van Dongen ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Two Times [was Re: Happy and Macros (was Re: ANNOUNCE: Happy 1.10 released)]
Manuel M. T. Chakravarty ([EMAIL PROTECTED]) wrote: [received message twice] Am I just the only one or does everybody receive messages posted to [EMAIL PROTECTED] and [EMAIL PROTECTED] twice? I find it a bit (I know I am exaggerating) annoying. Is there a way to avoid this? Regards, Marc ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: computer language shootout
Miles Egan ([EMAIL PROTECTED]) wrote: [shootout] Before it starts to explode, can we move this thread to the Haskell Cafe? Regards, Marc -- Marc van Dongen, CS Dept | phone: +353 21 4903578 University College Cork, NUIC | Fax:+353 21 4903113 Western Road, Cork, Ireland | Email: [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: code for exercise 4.10
rock dwan ([EMAIL PROTECTED]) wrote: : Iam having some difficulties doing exercise 4.10 from craft of fucntional : programming book ..is their a possible solution for this ? Can we please move this thread to the haskell cafe? Thanks in advance, Marc van Dongen ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: gcd 0 0 = 0
Simon Peyton Jones ([EMAIL PROTECTED]) wrote: : If someone could write a sentence or two to explain why gcd 0 0 = 0, : (ideally, brief ones I can put in the report by way of explanation), : I think that might help those of us who have not followed the details : of the discussion. Division in the context of gcds (of integers) is usually defined along the lines of: An integer $a$ divides integer $b$ if there exists an integer $c$ such that $a c= b$. Note that here division is a *relation* an not a *function*/*operator*. Given the definition of division being a relation it makes perfect sense to say that $0$ divides $0$ which is why gcd 0 0 = 0; and gcd 0 0 /= error Blah The gcd of two integers is usually defined as a non-negative number to make it unique. HTH. PS: I am strongly in favour of gcd 0 0 = 0. Regards, Marc van Dongen ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: gcd 0 0 = 0
Marc van Dongen ([EMAIL PROTECTED]) wrote: : An integer $a$ divides integer $b$ if there exists an integer : $c$ such that $a c= b$. [snip] : gcd 0 0 = 0; and : gcd 0 0 /= error Blah To make clear why $0$ (and not any other non-zero integer) is the gcd of $0$ and $0$ I should have added that for the integer case $g$ is called a greatest common divisor (gcd) of $a$ and $b$ if it satifies each of the following two properties: 1) $g$ divides both $a$ and $b$; 2) if $g'$ is a common divisor of $a$ and $b$ then $g'$ divides $g$. First notice that $0$ is a gcd of $0$ and $0$ because of the following: *) $0$ divides $0$ (and divides $0$); *) whenever $g'$ is an integer that divides $0$ and divides $0$ then $g'$ divides $0$. Next notice that if $g$ is any non-zero integer then $g$ cannot be a gcd of $0$ and $0$ because $0$ (a common divisor of $0$ and $0$) does not divide $g$. Finally, observe that this makes $0$ the unique gcd of $0$ and $0$. : The gcd of two integers is usually defined as a non-negative : number to make it unique. Regards, Marc van Dongen ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: gcd 0 0 = 0
Ch. A. Herrmann ([EMAIL PROTECTED]) wrote: : In contrast, 0*x=0, thus 0 divides 0 (somehow). : But I have problems with gcd being the greatest positive integer ... [snip] : - 0 is not positive, it is non-negative or natural : - 2 also divides 0 and 2 is a greater integer than 0 : (0 is the top element of the lattice formed by the division relation :but that is not clear by the expression greatest) : gcd a b is the greatest non-negative integer dividing both a and b such that anything that divides both a and b also divides gcd a b (so gcd a b is the greatest thing that divides both a and b). Regards, Marc van Dongen -- Marc van Dongen | [EMAIL PROTECTED] | Computer Science Department | Western Road | () ASCII ribbon campaign University College Cork |Cork, Ireland | /\ against HTML mail phone: +353 (0)21 4903578 | fax: 4903113 | ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: gcd 0 0 = 0
Alan Bawden ([EMAIL PROTECTED]) wrote: :In case it isn't clear already, these definitions make a lattice on :the positive integers, with divides ~ leq, gcd ~ meet and lcm ~ join, :using the report's definitions of gcd and lcm. : : Indeed, that's a nice way of putting it. How about if the report just : says: : :In order to make the non-negative integers into a lattice under `gcd' :and `lcm', we define `gcd 0 0 = 0'. It would surely make things a lot less accessible to people (including me) who do not have any (or limited) knowledge about lattices. Why not make it more accessible and use the following rule (ore something similar)? The greates common divison (gcd) of two integers a and b is the unique non-negative integer g which has each of the following two properties: 1) g divides both a and b; and 2) if g' also divides both a and b then g' also divides g, Here an integer a divides an integer b if there is an integer c such that b = c*a. Note that if you regard an integer a to be greater than another integer b if b divides a then the gcd of two intgerers may also be regarded as the greatest common divisor of a and b. Regards, Marc van Dongen ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: gcd 0 0 = 0
Lars Henrik Mathiesen ([EMAIL PROTECTED]) wrote: : Alan Bawden ([EMAIL PROTECTED]) wrote: : : Indeed, that's a nice way of putting it. How about if the report just : : says: : : : :In order to make the non-negative integers into a lattice under `gcd' : :and `lcm', we define `gcd 0 0 = 0'. [snip] : This is exactly what you get if you plug the relation 'divides' on the : non-negative integers into the definition of meet in a lattice. So : this formulation is no more or less complex to use than the lattice : one --- and people who do know about lattices will probably realize : this pretty fast. I disagree. Alan is talking about adding things to the haskell report. That document should be accessible to as many people as possible. I have not yet met anybody who had lattice theory in primary and/or secondary school. On the other hand I *have* met quite a few of them who have a pretty good idea about what it means for one number to divide another. [snip] Regards, Marc van Dongen -- Marc van Dongen | [EMAIL PROTECTED] | Computer Science Department | Western Road | () ASCII ribbon campaign University College Cork |Cork, Ireland | /\ against HTML mail phone: +353 (0)21 4903578 | fax: 4903113 | ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Big heap for a small program
I just wanted to report that the erroneous and tiny program added below can not be compiled within 6MB of heap (Admitted it can be compiled with a bigger heap). It was part of a bigger program that could not be compiled within 20MB of heap. Regards, Marc van Dongen [EMAIL PROTECTED] ** ghc-2.02 -c tmp.lhs -H6M -K10M -recomp -v -fglasgow-exts -cpp -hi-diffs -ansi -syslib ghc The Glorious Glasgow Haskell Compilation System, version 2.02, patchlevel 0 literate pre-processor: echo '#line 1 "tmp.lhs"' /tmp/ghc6307.lpp /usr/local/lib/ghc-2.02/unlit tmp.lhs - /tmp/ghc6307.lpp real0.1 user0.0 sys 0.0 Haskellised C pre-processor: echo '#line 1 "tmp.lhs"' /tmp/ghc6307.cpp /usr/local/lib/ghc-2.02/hscpp -v -D__HASKELL1__=4 -D__GLASGOW_HASKELL__=202 -I. -I/usr/local/lib/ghc-2.02/includes -I/usr/local/lib/ghc-2.02/includes /tmp/ghc6307.lpp /tmp/ghc6307.cpp real0.0 user0.0 sys 0.0 hscpp:CPP invoked: /usr/local/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/cpp -traditional -D__HASKELL1__=4 -D__GLASGOW_HASKELL__=202 -I. -I/usr/local/lib/ghc-2.02/includes -I/usr/local/lib/ghc-2.02/includes /tmp/ghc6307.lpp Haskell compiler: /usr/local/lib/ghc-2.02/hsc ,-N ,-W ,/tmp/ghc6307.cpp -fglasgow-exts -hisuf-prelude=.hi -hisuf=.hi -fignore-interface-pragmas -fomit-interface-pragmas -fsimplify \( -ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case -freuse-con -fpedantic-bottoms -fsimpl-uf-use-threshold0 -fessential-unfoldings-only -fmax-simplifier-iterations4 \) -himap=.:/usr/local/lib/ghc-2.02/hslibs/ghc/imports:/usr/local/lib/ghc-2.02/hslibs/ghc/imports:/usr/local/lib/ghc-2.02/imports -v -hifile=/tmp/ghc6307.hi -S=/tmp/ghc6307.s +RTS -H600 -K1000 Glasgow Haskell Compiler, version 2.02, for Haskell 1.3 GHC's heap exhausted; while trying to allocate 12 bytes in a 600-byte heap; use the `-Hsize' option to increase the total heap size. real 34.0 user 18.0 sys 0.1 deleting... /tmp/ghc6307.hi /tmp/ghc6307.s rm -f /tmp/ghc6307* make: *** [tmp.o] Error 1 ** module Too_Kuch( too_much ) where too_much :: [Int] - [(Int,Int)] - [(Int,[Int])] - Bool too_much ds ((k,m):q1) s0 = case (list1,list2) of [] - too_much ds q2m s2m where list1 = [k' | k' - ds, k == k'] list2 = [k' | k' - ds, m == k'] s1 = aas s0 k raM = [] raKM = listUnion (\a b - a) [] [] s1k = s1 q1k = raM s2k = s1 q2k = raM s2m = s1 q2m = raM s2km = foldr (flip aas) s1 raKM q2km = raKM listUnion :: (v - v - Bool) - [v] - [v] - [v] listUnion _ _ _ = [] aas :: (a,b) - a - (a,b) aas s _ = s
bug report
Hi, While I was constructing an example for ghc-users, I created the following program which crashed ghc-2.03. module Tmp( g ) where data AB p q = A | B p q g :: (Ord p,Ord q) = (AB p q) - Bool g (B _ _) = g A tmp.lhs:6: Warning: Possibly incomplete patterns in the definition of function `g' zonkIdOcc: g_aoQ panic! (the `impossible' happened): lookupBindC:no info! for: g_aoQ (probably: data dependencies broken by an optimisation pass) static binds for: Tmp.$d1{-rmM,x-} local binds for: Two seconds later, my system crashed. I assume ghc-2.03 did not cause this :-) Regards, Marc
tcLookupTyVar error (Similar as last one? Don't know.)
Sorry if this is caused by exactly the same as my last tcLookupTyVar report. Since I can't tell, I'll report it anyway. panic! (the `impossible' happened): tcLookupTyVar:a_r6F Please report it as a compiler bug to [EMAIL PROTECTED] If the instance definition for (*) at the end of this toy module is replaced by the definition that is commented, this all compiles fine. Strange, because the two implementations are equivalent modulo the theory {(*) = multiply}. Remove the `multiply :: a - a - a' part, and it compiles without problems. Hope this helps. Regards, Marc van Dongen module Rings( Group, Ring ) where import qualified Prelude( Ord(..), Eq(..), Num(..) ) import Prelude hiding( Ord(..), Eq(..), Num(..), MonadZero( zero ) ) class Group a where compare :: a - a - Prelude.Ordering fromInteger :: Integer - a (+) :: a - a - a (-) :: a - a - a zero :: a one :: a zero = fromInteger 0 one = fromInteger 1 -- class (Group a) = Ring a where -- (*) :: a - a - a -- (*) a b = -- case (compare a zero) of --EQ - zero --LT - zero - ((*) (zero - a) b) --GT - case compare a one of --EQ - b --_ - b + ((*) (a - one) b) class (Group a) = Ring a where (*) :: a - a - a (*) a b = multiply a b where multiply :: a - a - a multiply a b = case (compare a zero) of EQ - zero LT - zero - (multiply (zero - a) b) GT - case compare a one of EQ - b _ - b + (multiply (a - one) b)
profiling
Hi all, I have noticed that profiling in ghc-2.03 in combination with -O or -O2 is not possible because of some problems at the linking stage. Also it turns out that profiling combined with tracing results in programs which don't output any trace at all. Are the problems related to profiling an optimization resolved in ghc-2.04? I have programs which havilly depend of optimization. Without it, I have to say nasty things like +RTS -H100M -K1M -hC -RTS. Whereas normally a heap of 16M suffices. I have also noticed (no bug) that programs with bigger heaps need more stack. Is this due to garbage collection? Regards, Marc
-fshow-specialisations
This does not work in ghc-2.03. ghc-2.03: unrecognised option: -fshow-specialisations Hope this helps. Regards, Marc van Dongen
bug report
I would like to report the following bug in ghc-2.04. Profiling and optimizing with -O2 (I have not and will not try -O) leads to errors like this at link-time: CC_mkZubalancedZ92Z92Z92Zq_struct Blah1.o CC_DICTs_struct Blah2.o CC_mkZubalancedZ92Zq_struct Blah3.o CC_DICTsBlah2.o CC_nubZ92Zq_struct Blah4.o ld: fatal: Symbol referencing errors. No output written to Blah Hope this helps. Regards, Marc
bug report
Hi there, With ghc-2.04 I can successfully compile the following: module Buggy( buggy ) where data L a = L [a] class (Eq a,Ord a,Num a,Read a,Show a) = Class a where method :: a - Bool instance (Class a) = Class (L a) where method (L as) = True instance (Class a) = Eq (L a) where (==) e1 e2 = True instance (Class a) = Ord (L a) where compare a b = EQ instance (Class a) = Num (L a) where negate p = p instance (Class a) = Show (L a) where showsPrec _ _ c = c instance (Class a) = Read (L a) where readsPrec _ _ = [(L [],[])] buggy :: (Class a) = (L a) - (L a) buggy omega = g omega 1 g :: (Class a) = (L a) - a - (L a) g omega one = omega I had expected an overloading error because of the use of ``1'' in the definition for ``buggy''. Hope this helps. Regards, Marc van Dongen
bug report
If my memory serves me right, I haven't seen this one in ghc-2.03: *** Pattern-matching error within GHC! This is a compiler bug; please report it to [EMAIL PROTECTED] Fail: "typecheck/Unify.lhs", line 60: incomplete pattern(s) to match in function "unifyTauTyLists" Caused by the following faulty program: module F( f ) where f :: (Ord c) = c - c f c = g c g :: c - c g c = c where p = foldr (f c) [] [] Regards, Marc
bugg report (profiling again)
The latest patch provided Thu 16 Jul I still have problems with profiling and optimization: at the link-stage. (See also my report from Thu, 26 Jun). After: ghc -o ModuleMain -H40M -K4M -recomp -v \ -fglasgow-exts -cpp -hi-diffs -ansi -syslib ghc \ -fshow-import-specs -O2 -fvia-C -O2-for-C -prof -auto \ [object files snipped] I get the following error: Undefined first referenced symbol in file CC_mkZubalancedZ92Z92Z92Zq_struct Module1.o CC_DICTs_struct Module2.o CC_mkZubalancedZ92Zq_struct Module3.o CC_nubZ92Zq_struct Module4.o ld: fatal: Symbol referencing errors. No output written to ModuleMain Compiling without profiling and -O2 or compiling with -O2 but without profiling produces no errors. Regards, Marc van Dongen
bug report
Hi there, ghc-2.0498, complains about list-comprehensions when compiling the following. There's probably some code-transformation going on here. module Strange( strange ) where strange :: (a,a,a) - a strange triple | (first triple) == (fst triple) = first triple first :: (a,b,c) - a first (a,b,c) = a Stange.lhs:5: Couldn't match the type `PrelTup.(,,) tazz' against `PrelTup.(,)' Expected: `(tazz, tazz, tazz)' Inferred: `(tazz, tazN)' In a list-comprehension qualifer: `(first triple) PrelBase.== (PrelTup.fst triple)' Hope this helps, Marc van Dongen [EMAIL PROTECTED]
profiling
Hi there, I was wondering if somebody could help me with the following. I have *many* functions-names of the following form descriptor_prefix_TYPE_SUFFIX Many different functions have the same descriptor_prefix part. The TYPE_SUFFIX is meant to describe the type of the arguments of the different functions. When I profile my sources (-auto-all) it happens a lot that I see names of the following form SourceFile:ModuleName/descripto in stead of names of the form SourceFile:ModuleName/descriptor_prefix_TYPE_SUFFIX as I would have expected. Is there a way to get the full function-names out of the profiling package? I have looked at the .hp files, but the information does not seem to be available at that level. Any help would be greatly appreciated. Regards, Marc van Dongen [EMAIL PROTECTED]
bug report
Hi there, When compiling with 2.0899, I get the following error at linking stage: Undefined first referenced symbol in file getBufferMode /usr/local/ghc-2.09/lib/libHS.a(IOHandle__131.o) Main_main_closure /usr/local/ghc-2.09/lib/libHS.a(GHCmain__7.o) I have not used the function getBufferMode in my source. I do have a hSetBuffering. Any suggestions how to get around this? Thanks in advance, Marc van Dongen
happy bug
Hi there, I would like to report the following Happy bug. With rules of the form: This :: { Type } This: Is A Rule{ let a = 1 b = 2 in $1 } Happy generates .. (let a = 1 b = 2 .. Which isn't proper Haskell. Regards, Marc van Dongen
bug report
While compiling some stuff with 3.00 which normally compiles with 2.10, I came across the following: panic! (the `impossible' happened): ERROR: can't generate code for polymorphic case probably a mis-use of `seq' or `par'; the User's Guide has more details. Offending type: Residue.ResidueG{-rHG-} (Pol.Polynomial{-rHB-} $x0_ts1Kze $x1_ts1Kzd) - Group_.Subgroup{-rD3-} (Residue.ResidueG{-rHG-} (Pol.Polynomial{-rHB-} $x0_ts1Kze $x1_ts1Kzd)) PrelBase.Integer{-3g-} If more details are needed please call. Regards, Marc van dongen
Re: ghc-3.00-linux bug in linking
spj: : Sergey, Marc : : I've had a look at your Docon thing. It really is Sergey's thing. He deserves all the credit. [snip] Cheers, Marc
Is this a bug?
Hi there, I suspect the program included below is incorrect. Nevertheless it compiles fine under ghc-3.01 patchlevel 0. module Main( main ) where import List( genericLength ) main = putStr (show integral) putStr "\n" return () where integral = genericLength [] The reason why I am having problems with this program is that I cannot infer whether integral should be an Int or an Integer. ghc-3.01 thinks integral is an Int (a big positive integral is sometimes shown as a negative number). Regards, Marc
Re: Is this a bug?
[snip] : module Main( main ) where : import List( genericLength ) : main = putStr (show integral) : putStr "\n" : return () :where integral = genericLength [] [snip] : This is a legal Haskell program. The (ambiguous) type of `integral' is : (Num a = a), but Haskell disambiguates numeric expressions with the : help of `default' declarations. As per Haskell 1.4 (see section 4.3.4 Thanks for the pointer. : of the report), this means resolving `integral' to be a value of type : Int. I think this ``resolving'' may lead to unwanted results. It took me quite some time to discover that Integral was resolved to Int in some program I had. Is there a possibility of generating a warning message whenever programs like the one above have to be disambiguated? Maybe a compiler-switch to turn these warning messages on and off? : ghc-3.01 thinks integral is an Int (a big : positive integral is sometimes shown as a : negative number). : : ghc's implementation of Ints doesn't do overflow checking, so this is Now there is something I did know. : not too surprising. Disambiguate your program either by using type : annotations telling the compiler that `integral' really is an Integer : or use a `default' declaration. Thanks again, Marc
quotes deleted in error messages
Hello there, While compiling some source code of mine, containing the following lines (line numbers included): 321 322 minCycleLength :: Vertex - (MarcMap Vertex (MarcMap Vertex v)) - Maybe Int 323 minCycleLength v g 324 = mcl ws g'' 325 where ws = mapDom (rdMap g v) 326 g' = mapMap (\wrs - mapMap (\_ - Nothing) wrs) g 327 g'' = foldr (\w g' - wrMap (rdMap g' w) v (Just (w,1))) g' ws 328 mcl [] _ 329 = Nothing 330 Line 329 was the last line of the definition of minCycleLength (under construction). The following error message was returned by ghc-3.01 Search.lhs:327: Occurs check: cannot construct the infinite type: a1Lv = MarcMap a1Lt a1Lv Expected: MarcMap a1Lz (MarcMap a1Lz a1Lv) Inferred: MarcMap a1Lz a1Lv In the first argument of `MarcMap.rdMap', namely `g' In the first argument of `MarcMap.wrMap', namely `(MarcMap.rdMap g w)' It seems as if the quote symbol in the fragment (rdMap g' w) in line 327 has been omitted somehow. The two nearest occurences of the regular expression "rdMap[ ]+g[ ]+w" are more than 100 lines before and 30 lines after line 327. If needed, I can provide the source-code from which this was generated. Regards, Marc
tcLookupGlobalValue
Hi there, I would like to report the following. After splitting up one module in two seperate modules in two different files, I ended up with something as follows: swift more A.lhs module A( a ) where a = 1 swift more B.lhs module A( b ) where import A( a ) b = a + a The compilation session (modulo empty lines) went as follows: swift ghc-3.02 -c A.lhs ghc-3.02: module version changed to 1; reason: no old .hi file swift ghc-3.02 -c B.lhs importDecl wierdness: A.a{-r6J-} importDecl wierdness: A.a{-r6J-} panic! (the `impossible' happened): tcLookupGlobalValue: A.a{-r6J-} Please report it as a compiler bug to [EMAIL PROTECTED] Hope this helps. Regards, Marc [Add SPAM to my e-mail address if you don't want to send me mail.]
stranal/SaAbsInt.lhs:668: Non-exhaustive patterns in function `absApply'
Hi there, module F( f ) where class C a b where f :: a - b - b instance C Bool b where f a b = if a then b else b instance C (IO Bool) (IO b) where f a b = a = \bool - f bool b Leads to a ghc-3.02 crash: stranal/SaAbsInt.lhs:668: Non-exhaustive patterns in function `absApply' Hope this helps. Regards, Marc
bug report 4.00
Hi there, While compiling some stuff with 4.00 I get the following output before compilation stops. [snip] GNU CPP version 2.7.2 (sparc) #include "..." search starts here: #include ... search starts here: . /usr/local/ghc-4.00/lib/ghc-4.00/includes /usr/local/ghc-4.00/lib/ghc-4.00/includes /usr/local/include /usr/local/sparc-sun-solaris2.5/include /usr/local/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/include /usr/include End of search list. /usr/local/ghc-4.00/lib/ghc-4.00/includes/ClosureMacros.h:140: unterminated character constant /usr/local/ghc-4.00/lib/ghc-4.00/includes/StgMacros.h:87: unterminated string or character constant real0.3 user0.2 sys 0.0 deleting... /tmp/ghc6070.cpp /tmp/ghc6070.hi /tmp/ghc6070.hc /tmp/ghc6070_stb.c /tmp/ghc6070_stb.h ghc6070.c ghc6070.s /tmp/ghc6070_o.s rm -f /tmp/ghc6070* make: *** [Result.o] Error 1 Needless to say I haven't changed ClosereMacros.h or StgMacros.h Any suggestions how to fix this? Regards, Marc
`__ap_9_upd_info' undeclared
Hi there, Just at the end of the stage of creating an object file I got this message after which compilation was aborted. I have trimmed the verbose output (modulo pretty-printing) of ghc-4.01 to what I have appended at the end of this message. No Filnam.o was created. It seems to me something went wrong. If you need more info to know what is going on, please let me know and I may give it a shot to isolate the problem. Regards, Marc van Dongen ** ghc-4.00 -c Filnam.lhs -recomp -v -fglasgow-exts -cpp -hi-diffs -syslib misc -fvia-C -fno-update-analysis -optC-fallow-overlapping-instances [snip] /tmp/ghc8501.hc:664: `__ap_9_upd_info' undeclared (first use this function) /tmp/ghc8501.hc:664: (Each undeclared identifier is reported only once /tmp/ghc8501.hc:664: for each function it appears in.) real9.9 user9.7 sys 0.1 deleting... /tmp/ghc8501.lpp /tmp/ghc8501.cpp /tmp/ghc8501.hi /tmp/ghc8501.hc /tmp/ghc8501_stb.c /tmp/ghc8501_stb.h ghc8501.c ghc8501.s /tmp/ghc8501_o.s rm -f /tmp/ghc8501* make: *** [Filnam.o] Error 1
Pattern match(es) overlapped (again)
Hi there, This is ghc-4.01 I have not seen an instance of such a message for non-overlapping patterns for non-string types. As part of a where clause I have (modulo renaming) two equations of the following form: f Pat1 p2 p3 p4 = rhs1 f Pat2 p2 p3 p4 = rhs2 where Pat1 and Pat2 are disjoint ``ground'' instances of a user defined algebraic data type as in data Pattern = Pat1 | Pat1 I get nevertheless (modulo renaming) Pattern match(es) are overlapped in the definition of function `f' Pat2 p2 p3 p4 = ... I tried to isolate this but strangely enough the message is not generated in a module of the following type: module Overlap( overlap ) where data Pattern = A | B overlap A i j k = 0 overlap B i j k = 0 Let me know if you need more info. Regards, Marc
Overlapping Patterns (false alarm)
Hello again, Sorry about my previous ``report'' on overlapping patterns. I overlooked the fact that the first ``ground'' instance appearing in the function definition was, in fact, a variable. GHC really works! Regards, Marc
kind mismatch ($)
Hi there, When I compile the module below with ghc-4.01 and -fglasgow-exts, I get the following error message: YouCantDoThat.lhs:8: Kind mis-match between `_a :: *' and `Int# :: *#' Expected type: _a - Int' Inferred type: Int# - Int' In the first argument of `$', namely `Int'' In the right-hand side of an equation for `disallowed': Int' $ (a +# a) The function @allowed@ seems perfectly ok. module YouCantDoThat( disallowed, allowed ) where import GlaExts data Int' = Int' Int# disallowed :: Int# - Int' disallowed a = Int' $ a +# a allowed :: Int# - Int' allowed a = Int' (a +# a) One additional comment. I frequently use quotes (') as suffixes for identifier and type names. As can be seen above ghc loves adding quotes (` and ') around parts of its messages. This becomes *very* confusing when the last part of the message consists of an identifier suffixed by a one or more quote symbols. Regards, Marc van Dongen
Re^2: Extra output lines from trace.
Hi there, This is related to at least two earlier messages in this forum which sadly enough I only noticed today. It probably is a feature that since then trace doesn't print Trace on/Trace off anymore. Is there any reason for not doing this anymore? In my opinion it makes tracing very awkward. People who don't want Trace on/off could always redirect stderr to stdout and use a grep -v Trace. Maybe adding a traceOnOff function? Regards, Marc
Proposal for error message improvement
Dear implementors, Consider the following silly module definition: module Proposal( C ) where class C p a where ci :: p a - p a f :: (C p a) = f (p a) - f (p a) f a = case ci a of [] - a Compiling this leads to the following (ghc-4.02): Proposal.lhs:6: Inferred type is less polymorphic than expected Quantified type variable `f' is unified with `[]' When checking the type signature f :: forall f1 p1 a1. {C p1 a1} = f1 (p1 a1) - f1 (p1 a1) Here it is not difficult to see what causes the problem. However, the more equations there are in the definition of a function, the more difficult I have found it to locate the cause of errors resulting in error messages as the one above. Would it be possible to provide an explanation as to what could have caused such errors? Regards, Marc van Dongen
Re: Integer - Int conversion
Sigbjorn: : The question is what should 0x8000 :: Integer : become when its coerced into an int. : : GHC takes the lowest 32 bits. : Advantage: Equality above maxBound still "works" aka above. : Disadvantage: 0x + 1 == 0 ! : : Perhaps constant Int's larger than maxBound (or smaller : than minBound) should be a compile time error? : : : Int arithmetic is modulo maxBound (at least that's what : ghc and Hugs implements), so making the Integer-Int conversion : fall into line with that, has some merit. On my machine the following program: main = do putStr "According to ghc-4.02 (1-maxBound)^2 = " putStr $ show mult1 putStr "\nAccording to ghc-4.02 (maxBound-1)^2 = " putStr $ show mult2 where mult1, mult2 :: Int mult1 = (1-maxBound)*(1-maxBound) mult2 = (maxBound-1)*(maxBound-1) outputs: According to ghc-4.02 (1-maxBound)^2 = 4 According to ghc-4.02 (maxBound-1)^2 = 4 Mod maxBound the result of both multiplication should have been 1. Maybe it is better to rely on Integers. Regards, Marc van Dongen
bug with trace
Hi there, The following program (ghc-4.02): f :: [Int] - Int f (i:is) | trace "0" False = error [] f is | trace "1" False = error [] f is = f $ tail is main = putStr $ show $ f [0] Outputs: 1 Fail: Prelude.tail: empty list wheras it should have output: 0 1 Fail: Prelude.tail: empty list Regards, Marc van Dongen
Internal Happy Error
Hi there, The following ``code'' forces ghc-4.04 to crash with an internal Happy error message: module Rules where import GlaExts import PrelGHC integerGcd :: Integer - Integer - Integer integerGcd a b = case a of (S# a) - case b of (S# b) - unsafePerformIO $ _ccall_ gcdSSSZh (I# a) (1::Int) (I# b) = \g - case g of (I# g) - return (S# g) (J# sb b) - unsafePerformIO $ _casm_ gcdSBSZh a sb b = \g - case g of (I# g) - return (S# g) Hope that helps. Regards, Marc van Dongen
Re: ghc from CVS (1999/07/31) throws core...
: Hi! : : I tried to recompile the latest ghc (1999/07/31) on a Linux/glibc2.1.1 : system (egcs 2.91.66), but there seems to be a problem: the build works, but : the resulting compiler produces executables, that throw core, even with : "main = return ()". I've noticed that as well. Code like does not produce proper error messages anymore which it did with ghc-4.02. One wonders where the performance boost came from:-) $ cat tmp.lhs module Main( main ) where main = putStr $ show q where q = quot 1 0 $ ghc-4.02 tmp.lhs ghc-4.02: module version changed to 176; reason: usages changed 1006 swift ~/ghc/constraints/mixed $ a.out Fail: Prelude.Integral.quot{Integer}: divide by 0 1007 swift ~/ghc/constraints/mixed $ ghc-4.04 tmp.lhs ghc-4.04: module version changed to 177; reason: usages changed 1008 swift ~/ghc/constraints/mixed $ a.out Arithmetic Exception (core dumped) Regards, Marc van Dongen
Internal Happy Error (another one)
Hi there, ghc-4.04's parser does not seem to like expressions of the following kind: case a of (#I a) - and blah (# sa, a, #) Upon using these expressions it dies due to an internal Happy error. Hope this helps, Marc van Dongen
make depend
Hi There, When I noticed that my mkdependHS didn't work any more I noticed that the release notes for ghc-4.04 mentioned that this program had become obsolete and that ghc-4.04 -M should be used instead. The problem I have with ghc-4.04 -M is that is seems to be *very* reluctant to generate dependencies. Invoking ghc-4.04 as follows: ghc-4.04 -M for a Makefile containing the following lines SRCS = *.lhs *.hs .SUFFIXES : .o .hi .hs .lhs .o.hi: @: .lhs.o: $(HC) -c $ .hs.o: $(HC) -c $ (and more) in a directory containing *lots* of source files does absolutely nothing. The last two lines in the resulting Makefile are # DO NOT DELETE: Beginning of Haskell dependencies # DO NOT DELETE: End of Haskell dependencies The result of invoking ghc-4.04 -M does indeed update the Makefile (I checked this using an ls -l). I cannot find any documnetation about the -M option so I don't know if I am doing something wrong.s Am I doing something wrong or is this a bug? Any help would be greatly appreciated. Yours desperately, Marc
Re: make depend
: Hi, Hi! Thanks for writing. : Did you try just `ghc-4.04 -M'? If so, you must add .hs file names after : the command. I did. : $ ghc-4.04 -M your.hs haskell.hs source.hs programs.hs That doesn't seem to do very much either. : You can find dependencies among `.hs' files in the Makefile. I think I'll wait until I am refered to some form of documentation. Thanks again, Marc van Dongen
Re: make depend
Sigbjorn: : : Did you try just `ghc-4.04 -M'? If so, you must add .hs : file names after : : the command. : : I did. : : : $ ghc-4.04 -M your.hs haskell.hs source.hs programs.hs : : That doesn't seem to do very much either. : : : You can find dependencies among `.hs' files in the Makefile. : : I think I'll wait until I am refered to some form : of documentation. : : : Kwanghoon Choi's comments is really all there's to it, but see : top of Section 8.1 in the user's guide for more. That's interesting. I hadn't noticed that section. I looked at Section 2 (Using GHC/command line options) which doesn't make any reference to the -M flag. I'll try again. Thanks. Regards, Marc van Dongen
Segmentation Fault (After installing 2.95.2)
Hi there, I have just instaled gcc version 2.95.2 and recompiled one of my programs. When running it, it immediately halts, but not befor it has uttered the famous words: Segmentation Fault (core dumped) Any suggestions as to how to solve this fix this? (Other C programs compiled with 2.95.2 sem to run fine.) Regards, Marc van Dongen ___ Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
CVS make all failed: RegAllocInfo
Hello there, A make all from CVS failed because of the following: /usr/local/bin/ghc -cpp -fglasgow-exts -Rghc-timing -I. -IcodeGen -InativeGen -Iparser -iutils:basicTypes:types:hsSyn:prelude:rename:typecheck:deSugar:coreSyn:specialise:simplCore:stranal:stgSyn:simplStg:codeGen:absCSyn:main:profiling:parser:usageSP:cprAnalysis:nativeGen -recomp -c nativeGen/RegAllocInfo.lhs -o nativeGen/RegAllocInfo.o -osuf o RegAllocInfo.lhs:565: Variable not in scope: `g1' RegAllocInfo.lhs:565: Variable not in scope: `g2' RegAllocInfo.lhs:565: Variable not in scope: `f14' RegAllocInfo.lhs:565: Variable not in scope: `f15' RegAllocInfo.lhs:565: Variable not in scope: `f16' RegAllocInfo.lhs:565: Variable not in scope: `f18' Compilation had errors make[2]: *** [nativeGen/RegAllocInfo.o] Error 1 make[1]: *** [all] Error 1 make: *** [all] Error 1 I built the same from cvs yesterday. After updating today this failed. Any suggestions on how to fix this will be greatly appreciated. Thanks in advance. Marc van Dongen *** log *** ===fptools== Recursively making `all' in glafp-utils ghc hslibs ... PWD = /newdisk/dongen/cvs/fptools ==fptools== make all -r; in /newdisk/dongen/cvs/fptools/glafp-utils ===fptools== Recursively making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdependC make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/lndir make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/ltx make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdirhier make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/runstdtest make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/sgmlverb make[2]: Nothing to be done for `all'. ===fptools== Finished making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make all -r; in /newdisk/dongen/cvs/fptools/ghc ===fptools== Recursively making `all' in utils driver includes rts docs compiler lib ... PWD = /newdisk/dongen/cvs/fptools/ghc ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils ===fptools== Recursively making `all' in hp2ps hscpp mkdependHS parallel stat2resid unlit ... PWD = /newdisk/dongen/cvs/fptools/ghc/utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc
CVS: make all: [MatchPS.o] Segmentation Fault (core dumped)
Hello again, Just to let you know. When trying to make all from CVS I got the following: make[2]: *** [MatchPS.o] Segmentation Fault (core dumped) make[1]: *** [all] Error 1 make: *** [all] Error 1 I had this before. Re-making will solve the problem. Let me know if more information is required. Regards, Marc van Dongen
cvs 4.07 arithmetic errors in Integer arithmetic
Hi there, I am trying to fix some errors in the Integer arithmetic Simon Marlow and I spotted. I just reinstalled cvs from scratch yesterday and build ghc-4.07 from it. I then noticed that one of my programs resulted in completely different output than it did with ghc-4.06 (or even 4.07 from cvs a few weeks ago). I am pretty convinced that the ghc-4.06 output is correct and the 4.07 output is **very** wrong. I am pretty sure the differences are caused by changes in Integer arithmetic (again, I have not noticed these problems with 4.07 and cvs a few weeks ago, so the changes must have been recent.) If I were to guess the errors are caused by changes to quot or gcd. Unfortunately I have very limited time to spend on this. (I already spent more time on this than I had anticipated I would need.) Is there anybody who thinks that a *recent* change made by him could have led to the problems I noticed? I would appreciate suggestions from cvs hackers as to what is a good approach to locate the cause of the problem. Finally I would like to know if there is a way to get my hands on a cvs tree for 4.06 so that I can compare the two and see what happens when I apply a fix to 4.07 against applying the same fix for 4.06? Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
cvs: MachCode (undeclared functions)
Hi there, Make all fails due to the fact that some functions in nativeGen/MachCode are undeclared. Log appended. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED] ===fptools== Recursively making `all' in glafp-utils ghc hslibs ... PWD = /newdisk/dongen/cvs/fptools ==fptools== make all -r; in /newdisk/dongen/cvs/fptools/glafp-utils ===fptools== Recursively making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdependC make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/lndir make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/ltx make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdirhier make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/runstdtest make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/sgmlverb make[2]: Nothing to be done for `all'. ===fptools== Finished making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make all -r; in /newdisk/dongen/cvs/fptools/ghc ===fptools== Recursively making `all' in utils driver includes rts docs compiler lib ... PWD = /newdisk/dongen/cvs/fptools/ghc ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils ===fptools== Recursively making `all' in hp2ps hscpp mkdependHS parallel stat2resid unlit ... PWD = /newdisk/dongen/cvs/fptools/ghc/utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/hp2ps make[3]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/hscpp make[3]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/mkdependHS make INSTALLING=0 BIN_DIST=0
cvs: Profiling.c:462: strucuture has no member named `emitted'
Hi there, I just updated cvs and now make fails because of a Profiling.c:462: strucuture has no member named `emitted' thingy. Log appended. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED] ===fptools== Recursively making `all' in glafp-utils ghc hslibs ... PWD = /newdisk/dongen/cvs/fptools ==fptools== make all -r; in /newdisk/dongen/cvs/fptools/glafp-utils ===fptools== Recursively making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdependC make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/lndir make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/ltx make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdirhier make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/runstdtest make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/sgmlverb make[2]: Nothing to be done for `all'. ===fptools== Finished making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make all -r; in /newdisk/dongen/cvs/fptools/ghc ===fptools== Recursively making `all' in utils driver includes rts docs compiler lib ... PWD = /newdisk/dongen/cvs/fptools/ghc ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils ===fptools== Recursively making `all' in hp2ps hscpp mkdependHS parallel stat2resid unlit ... PWD = /newdisk/dongen/cvs/fptools/ghc/utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/hp2ps make[3]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/hscpp make[3]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/mkdependHS make
cvs: make boot fails: mkdependHS-inplace: can't open directory haxml/lib
Hello again, When carrying out a make boot with cvs this caused a problem because of the following: mkdependHS-inplace: can't open directory haxml/lib I have appended a log. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED] ===fptools== Recursively making `boot' in glafp-utils ghc hslibs ... PWD = /newdisk/dongen/cvs/fptools ==fptools== make boot -r; in /newdisk/dongen/cvs/fptools/glafp-utils ===fptools== Recursively making `boot' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make boot - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdependC ==fptools== make boot - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/lndir ../../glafp-utils/mkdependC/mkdependC -f .depend -- -- lndir.c ==fptools== make boot - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/ltx ==fptools== make boot - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdirhier ==fptools== make boot - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/runstdtest ==fptools== make boot - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/sgmlverb ../../glafp-utils/mkdependC/mkdependC -f .depend -- -- sgmlverb.c ===fptools== Finished making `boot' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make boot -r; in /newdisk/dongen/cvs/fptools/ghc ===fptools== Recursively making `boot' in utils driver includes rts docs compiler lib ... PWD = /newdisk/dongen/cvs/fptools/ghc ==fptools== make boot - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils ===fptools== Recursively making `boot' in hp2ps hscpp mkdependHS parallel stat2resid unlit ... PWD = /newdisk/dongen/cvs/fptools/ghc/utils ==fptools== make boot - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/hp2ps ../../../glafp-utils/mkdependC/mkdependC -f .depend -- -O-- AreaBelow.c AuxFile.c Axes.c Curves.c Deviation.c Dimensions.c Error.c HpFile.c Key.c Main.c Marks.c PsFile.c Reorder.c Scale.c Shade.c TopTwenty.c TraceElement.c Utilities.c ==fptools== make boot - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/hscpp ==fptools== make boot - --no-print-directory -r
Re: make boot fails: mkdependHS-inplace: can't open directory hax ml/lib
Simon Marlow ([EMAIL PROTECTED]) wrote: : When carrying out a make boot with cvs this caused a problem : because of the following: : mkdependHS-inplace: can't open directory haxml/lib : : Maybe you need to 'cvs update -Pd'. The haxml directory just appeared : yesterday. Thanks. Mike Gunter also pointed me in this right direction. Regards, Marc -- Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
cvs: Profiling.c:462: parse error before `'
Hello again, When making cvs it halts because of a Profiling.c:462: parse error before `' I have appended a log. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED] ===fptools== Recursively making `all' in glafp-utils ghc hslibs ... PWD = /newdisk/dongen/cvs/fptools ==fptools== make all -r; in /newdisk/dongen/cvs/fptools/glafp-utils ===fptools== Recursively making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdependC make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/lndir make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/ltx make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdirhier make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/runstdtest make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/sgmlverb make[2]: Nothing to be done for `all'. ===fptools== Finished making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make all -r; in /newdisk/dongen/cvs/fptools/ghc ===fptools== Recursively making `all' in utils driver includes rts docs compiler lib ... PWD = /newdisk/dongen/cvs/fptools/ghc ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils ===fptools== Recursively making `all' in hp2ps hscpp mkdependHS parallel stat2resid unlit ... PWD = /newdisk/dongen/cvs/fptools/ghc/utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/hp2ps make[3]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/hscpp make[3]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/mkdependHS make INSTALLING=0 BIN_DIST=0
Re: Profiling.c:462: parse error before `'
Simon Marlow ([EMAIL PROTECTED]) wrote: [...] : It looks like you had a conflict when you cvs updated. Check Profiling.c : for the telltale ''. If you didn't make any changes to Profiling.c that : you want to keep (I suspect you just fixed yesterday's problem by hand, : hence the conflict), then just remove Profiling.c and cvs update to recover : the stock version. Thanks, that solved that problem. Now I get a:-( StixPrim.lhs:6: Could not find valid [boot] interface file `OrdList' Any suggestions? Log appended. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED] ===fptools== Recursively making `all' in glafp-utils ghc hslibs ... PWD = /newdisk/dongen/cvs/fptools ==fptools== make all -r; in /newdisk/dongen/cvs/fptools/glafp-utils ===fptools== Recursively making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdependC make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/lndir make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/ltx make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdirhier make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/runstdtest make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/sgmlverb make[2]: Nothing to be done for `all'. ===fptools== Finished making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make all -r; in /newdisk/dongen/cvs/fptools/ghc ===fptools== Recursively making `all' in utils driver includes rts docs compiler lib ... PWD = /newdisk/dongen/cvs/fptools/ghc ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils ===fptools== Recursively making `all' in hp2ps hscpp mkdependHS parallel stat2resid unlit ... PWD = /newdisk/dongen/cvs/fptools/ghc/utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/hp2ps make[3]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools
cvs built ghc creates segmentation fault generating binaries
Hello again, Just to let you know this problem exists. I have built ghc from cvs (didn't make any changes to the sources) and used it to compile one of my programs. When run it fails with a: Segmentation Fault This didn't happen before. Again I have resons for suspecting Integer arithmetic to be the cause of the problem. I'll try to locate the error and let you know of my findings. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
Re: -O2 == crash
Marcin 'Qrczak' Kowalczyk ([EMAIL PROTECTED]) wrote: : Thu, 9 Mar 2000 01:58:02 -0800, Simon Marlow [EMAIL PROTECTED] pisze: : : So the likely candidate would appear to be your gcc - which version : do you have installed? : : 2.95.1 : : With -O -O2-for-C it still crashes. With -O it does not. : With -O2-for-C it does not. Hi Macin, I installed gcc-2.95 some months ago and downgraded to 2.8.1 because I couldn't get it running. gcc-2.8.1 seemed to work fine (until a few days ago). Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
FastString.lhs:629: parse error on input `#'
Hi again, When trying to build ghc from cvs (cvs update, make clean, etc) I got: utils/FastString.o -osuf o FastString.lhs:629: parse error on input `#' Compilation had errors make[2]: *** [utils/FastString.o] Error 1 make[1]: *** [all] Error 1 make: *** [all] Error 1 log appended. Regards, Marc van Dongen -- ===fptools== Recursively making `all' in glafp-utils ghc hslibs ... PWD = /newdisk/dongen/cvs/fptools ==fptools== make all -r; in /newdisk/dongen/cvs/fptools/glafp-utils ===fptools== Recursively making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdependC make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/lndir make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/ltx make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/mkdirhier make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/runstdtest make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/glafp-utils/sgmlverb make[2]: Nothing to be done for `all'. ===fptools== Finished making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/cvs/fptools/glafp-utils ==fptools== make all -r; in /newdisk/dongen/cvs/fptools/ghc ===fptools== Recursively making `all' in utils driver includes rts docs compiler lib ... PWD = /newdisk/dongen/cvs/fptools/ghc ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils ===fptools== Recursively making `all' in hp2ps hscpp mkdependHS parallel stat2resid unlit ... PWD = /newdisk/dongen/cvs/fptools/ghc/utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/hp2ps make[3]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/hscpp make[3]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/cvs/fptools/ghc/utils/mkdependHS make INSTALLING=0 BIN_DIST=0 - --no-print-directory -r all make[4]: Nothing to be done for `all
Re: FastString.lhs:629: parse error on input `#'
George Russell ([EMAIL PROTECTED]) wrote: : Marc van Dongen wrote: [error at line 629] : Odd, because I get (from the anon-cvs repository) : : /usr/local/pub-bkb/ghc/ghc-latest/bin/ghc -cpp -fglasgow-exts -Rghc-timing -I. :-IcodeGen -InativeGen -Iparser :-iutils:basicTypes:types:hsSyn:prelude:rename:typecheck:deSugar:coreSyn:specialise:simplCore:stranal:stgSyn:simplStg:codeGen:absCSyn:main:profiling:parser:usageSP:cprAnalysis:nativeGen : -recomp -H40m -Onot -c utils/FastString.lhs -o utils/FastString.o -osuf o : : FastString.lhs:632: : Couldn't match : `ByteArray Int' against `MutableByteArray RealWorld Int' : Expected type: ByteArray Int : Inferred type: MutableByteArray RealWorld Int : In the second argument of `hPutBufBA', namely `mba' : In a do statement: hPutBufBA handle mba (I# l#) : : Compilation had errors : : : "cvs status" tells me that my copy of FastString.lhs is up-to-date. Maybe you build with a different ghc-version? #if __GLASGOW_HASKELL__ 405 | otherwise = hPutBufBA handle (ByteArray bot ba#) (I# l#) #elsif __GLASGOW_HASKELL__ 407 | otherwise = hPutBufBA handle (ByteArray bot bot ba#) (I# l#) #else | otherwise = do mba - stToIO $ unsafeThawByteArray (ByteArray (bot::Int) bo hPutBufBA handle mba (I# l#) Just a guess. Regards, Marc van Dongen
Re: cvs: make all - error PackedString.lhs
Sven Panne ([EMAIL PROTECTED]) wrote: : Marc van Dongen wrote: : Just to let jou know. I just updated and tried to rebuild : ghc from cvs. I then got: : : PackedString -c PackedString.lhs -o PackedString.o -osuf o : [...] : : I've already fixed that one (and a related bug in ghc itself) : yesterday evening. But I don't know when exactly these changes : are mirrored in the anonCVS. That probably explains it. I updated yesterday rebuilt (failed) and then posted the report. Regards, Marc
Re: Enum instance for Ratio
George Russell ([EMAIL PROTECTED]) wrote: : Marc van Dongen wrote: : Wouldn't that make Enum depend on Ord? : Doesn't seem to make sense if classes are : enumerable but not comparable. Of course above I should have said orderable in stead of comparable. : What examples are there of types for which it would be sensible to implement : Enum but not Ord? The concept rather puzzles me. In particular, suppose you : don't have an ordering on the pair (a,b). How do you propose to compute :[a..b] data Human = Woman | Man I can see reasons why I would like to know which Humans are there from a to b given a certain predifined order. Bu having said that I also think that in order to implement this, it is not necesary to to have to say that Woman is less than Man or vice versa. Regards, Marc
Re: Enum instance for Ratio
George Russell ([EMAIL PROTECTED]) wrote: : A logical definition of Enum (to me wearing a mathematical hat) : would be : : succ x = min { y | y x} : Wouldn't that make Enum depend on Ord? Doesn't seem to make sense if classes are enumerable but not comparable. Regards, Marc
cvs: make all - SocketPrim error
Hi all, When making ghc from cvs, make all fails due to a SocketPrim -syslib lang -syslib text -optc-DNON_POSIX_SOURCE -c SocketPrim.lhs -o SocketPrim.o -osuf o does not exist Action: getDirectoryContents Reason: no such file or directory /newdisk/dongen/CVS/fptools/hslibs/text/parsec make[2]: *** [SocketPrim.o] Error 1 make[1]: *** [all] Error 1 make: *** [all] Error 1 Just to let you know. Log appended. Regards, Marc van Dongen ===fptools== Recursively making `all' in glafp-utils ghc hslibs ... PWD = /newdisk/dongen/CVS/fptools ==fptools== make all -r; in /newdisk/dongen/CVS/fptools/glafp-utils ===fptools== Recursively making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/CVS/fptools/glafp-utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/CVS/fptools/glafp-utils/mkdependC make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/CVS/fptools/glafp-utils/lndir make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/CVS/fptools/glafp-utils/ltx make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/CVS/fptools/glafp-utils/mkdirhier make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/CVS/fptools/glafp-utils/runstdtest make[2]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/CVS/fptools/glafp-utils/sgmlverb make[2]: Nothing to be done for `all'. ===fptools== Finished making `all' in mkdependC lndir ltx mkdirhier runstdtest sgmlverb ... PWD = /newdisk/dongen/CVS/fptools/glafp-utils ==fptools== make all -r; in /newdisk/dongen/CVS/fptools/ghc ===fptools== Recursively making `all' in utils driver includes rts docs compiler lib ... PWD = /newdisk/dongen/CVS/fptools/ghc ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/CVS/fptools/ghc/utils ===fptools== Recursively making `all' in hp2ps hscpp mkdependHS parallel stat2resid unlit ... PWD = /newdisk/dongen/CVS/fptools/ghc/utils ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/CVS/fptools/ghc/utils/hp2ps make[3]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/CVS/fptools/ghc/utils/hscpp make[3]: Nothing to be done for `all'. ==fptools== make all - --no-print-directory -r; in /newdisk/dongen/CVS
SocketPrim (more info)
Sorry about the previous messgae. Perhaps I shold have bee a bit more explicit about what I deid in order to build ghc from cvs. What I did (starting this morning) was: make clean \ cvs update -Pd ghc hslibs \ cd ghc \ ./configure \ cd .. \ ./configure \ make boot \ make all Regards, Marc van Dongen
Re: Recent Sparc breakage
[Me reporting: Integer artithmetic broken.] [Simon Marlow reporting: Integer arithmetic possibly fixed.] Hello again, It has taken me 8 days to rebuild ghs from cvs after this report. Unfortunately I have to report thast the Integer arithmetic is still broken. Pleases feel free to contact me for further info:. Regards, Marc van Dongen
mkdependHS (proposal for improvement)
Hi there, I don't know if this is a known problem. The ``problem'' with mkdependHS is when it is used in conjunction with happy. The imports in the .ly file are not recognised and one has to rebuild sources by hand. I am surprised I never noticed this before and it isn't a big problem. Just a thought. Regards, Marc
Integer arithmetic broken (again)
Hello there, I downloaded the latest version of ghc from CVS yesterday, rebuilt and noticed that the Integer arithmetic is broken again. I decided to rebuild because of an email from yesterday that suggested that gcd had been improved---but I may have understood this incorrectly. Please feel free to contact me for further information. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 4903578 University College Cork, NUIC | Fax:+353 21 4903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
Re: Integer arithmetic broken (again)
Sven Panne ([EMAIL PROTECTED]) wrote: : [EMAIL PROTECTED] might be the more appropriate list. A reader of that list asked me explicitly not to send it to that list because he thought it wasn't appropriate to sent cvs-bug messages to that list:-) I'll send further error messages to cvs-ghc in the future. It does seem to be more appropriate. : Could you send a (small) program exhibiting *what* is broken? : Guessing one of the many numerical operations on Integers is a : little bit hard... :-) [see below] : I decided to rebuild because of an email from yesterday that : suggested that gcd had been improved---but I may have understood : this incorrectly. : : GCD on Int/Integer now uses the GMP lib, not the generic version for : Integral types. Furthermore, compile-time constant folding in general : has been improved (or broken by me :-} since 4.06, so it could be a : bug there, too, so an example would really be helpful. Sending a small program will be very difficult. the next email I'll send to you will be a tarball with instructions of how to generate an example which produces wrong output. I've spent too much time on this in the past and am too bussy to have alook at it myself at the moment. Sorry about that. Regards, Marc
ghc-4.08 core dumps: probably parenthesis related
Hello all, Yesterday I downloaded ghc-4.08 (thanks again to Simon). When I ran ghc-4.08 today I got a $ ghc geom.hs Segmentation Fault - core dumped I think it is caused by the following contrived list-comprehension. c' = [ e | e - c, ((elem e ls) ] Note that the level of parentheses is not ok. Hope this helps. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 4903578 University College Cork, NUIC | Fax:+353 21 4903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
Bug report: mkPrimReturnCode: Upd tpl4{-c9vM-}
Hello there, Just after I added some strictness annotations (!) to an algebraic datatype, ghc-4.08 paniced and halted with the following error message: panic! (the `impossible' happened): mkPrimReturnCode: Upd tpl4{-c9vM-} Please report it as a compiler bug to [EMAIL PROTECTED] The annotations were added in a file containing type and data definitions only. The compilation of that file went fine. The compilation of another one depending on the types went wrong:-( I have attached a log. Let me know if you need some more info. Regards, Marc van Dongen -- Marc van Dongen, CS Dept | phone: +353 21 4903578 University College Cork, NUIC | Fax:+353 21 4903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED] ghc-4.08 -prof -auto-all -H20M -recomp -v -fglasgow-exts -cpp -hi-diffs -syslib posix -syslib util -fvia-C -fno-update-analysis -optC-fallow-overlapping-instances -funbox-strict-fields -fno-prune-tydecls -fno-prune-instdecls -ddump-rules -ddump-simpl-stats -O2 -c PSearch.lhs The Glorious Glasgow Haskell Compilation System, version 4.08 literate pre-processor: echo '#line 1 "PSearch.lhs"' /tmp/ghc18636.lpp /usr/local/lib/ghc-4.08/unlit PSearch.lhs - /tmp/ghc18636.lpp real0.0 user0.0 sys 0.0 Effective command line: -prof -auto-all -H20M -recomp -v -fglasgow-exts -cpp -hi-diffs -syslib posix -syslib util -fvia-C -fno-update-analysis -optC-fallow-overlapping-instances -funbox-strict-fields -fno-prune-tydecls -fno-prune-instdecls -ddump-rules -ddump-simpl-stats -O2 -c Haskellised C pre-processor: echo '{-# LINE 1 "PSearch.lhs" -}' /tmp/ghc18636.cpp /usr/local/lib/ghc-4.08/hscpp -v '-DPROFILING' -D__HASKELL__=98 -D__HASKELL1__=5 -D__GLASGOW_HASKELL__=408 -D__HASKELL98__ -D__CONCURRENT_HASKELL__ -I. -I/usr/local/lib/ghc-4.08/includes /tmp/ghc18636.lpp /tmp/ghc18636.cpp real0.0 user0.0 sys 0.0 hscpp:CPP invoked: gcc -E -undef -traditional -DPROFILING -D__HASKELL__=98 -D__HASKELL1__=5 -D__GLASGOW_HASKELL__=408 -D__HASKELL98__ -D__CONCURRENT_HASKELL__ -I. -I/usr/local/lib/ghc-4.08/includes - /tmp/ghc18636.lpp ghc-4.08:recompile:Input file PSearch.lhs newer than PSearch.o Haskell compiler: /usr/local/lib/ghc-4.08/hsc /tmp/ghc18636.cpp -fglasgow-exts -fallow-overlapping-instances -funbox-strict-fields -fno-prune-tydecls -fno-prune-instdecls -ddump-rules -ddump-simpl-stats -fauto-sccs-on-all-toplevs -fscc-profiling -ffoldr-build-on -fdo-eta-reduction -fdo-lambda-eta-expansion -fcase-of-case -fcase-merge -flet-to-case -fpedantic-bottoms -fsimplify [ -finline-phase0 -fno-rules -fno-case-of-case -fmax-simplifier-iterations2 ] -fspecialise -ffloat-outwards -ffloat-inwards -fsimplify [ -finline-phase1 -fmax-simplifier-iterations4 ] -fsimplify [ -finline-phase2 -fmax-simplifier-iterations2 ] -fsimplify [ -fmax-simplifier-iterations2 ] -fstrictness -fcpr-analyse -fworker-wrapper -fsimplify [ -fmax-simplifier-iterations4 ] -ffloat-outwards -fcse -ffloat-inwards -fsimplify [ -fmax-simplifier-iterations4 ] -fmassage-stg-for-profiling -flet-no-escape -fwarn-overlapping-patterns -fwarn-missing-methods -fwarn-missing-fields -fwarn-deprecations -fwarn-duplicate-exports -fhi! -version=408 -static "-himap=.%.hi:/usr/local/lib/ghc-4.08/imports/lang%.p_hi:/usr/local/lib/ghc-4.08/imports/posix%.p_hi:/usr/local/lib/ghc-4.08/imports/lang%.p_hi:/usr/local/lib/ghc-4.08/imports/concurrent%.p_hi:/usr/local/lib/ghc-4.08/imports/lang%.p_hi:/usr/local/lib/ghc-4.08/imports/util%.p_hi:/usr/local/lib/ghc-4.08/imports/lang%.p_hi:/usr/local/lib/ghc-4.08/imports/posix%.p_hi:/usr/local/lib/ghc-4.08/imports/lang%.p_hi:/usr/local/lib/ghc-4.08/imports/lang%.p_hi:/usr/local/lib/ghc-4.08/imports/posix%.p_hi:/usr/local/lib/ghc-4.08/imports/lang%.p_hi:/usr/local/lib/ghc-4.08/imports/concurrent%.p_hi:/usr/local/lib/ghc-4.08/imports/lang%.p_hi:/usr/local/lib/ghc-4.08/imports/util%.p_hi:/usr/local/lib/ghc-4.08/imports/lang%.p_hi:/usr/local/lib/ghc-4.08/imports/posix%.p_hi:/usr/local/lib/ghc-4.08/imports/lang%.p_hi:/usr/local/lib/ghc-4.08/imports/std%.p_hi" "-himap-sep=:"-v -hifile=/tmp/ghc18636.hi -olang=C -ofile=/tmp/ghc18636.hc -F=/tmp/ghc18636_stb.c -FH=/tmp/ghc18636_stb! .h +RTS -H2000 -K100 Glasgow Haskell Compiler, version 4.08, for Haskell 98, compiled by GHC version 4.08 Transformation rules Top-level specialisations FloatOut stats: 322 Lets floated to top level; 40 Lets floated elsewhere; from 287 Lambda groups Strictness analysis statistics Lambda vars: 0/0; Case vars: 218/661; Let vars: 29/232 FloatOut stats: 18 Lets floated to top level; 3 Lets floated elsewhere; from 203 Lambda groups Grand total simplifi
Re: 'undefined reference to `_imp__Addr_zdfNumAddrOff_closure' (? ????????)
Simon Peyton Jones ([EMAIL PROTECTED]) wrote: [snip] : Subject: 'undefined reference to `_imp__Addr_zdfNumAddrOff_closure' [snip] : I am using GHC 4.08.1 on Win32. Every attempt to compile the code below : results in a message error on link phase. The message is shown after the : code. Appologies if I am too paranoid here---I've been reinstalling software for the last 20 hours or so:-) Are these C identifiers? They are a bit long. ANSI C only guarantees that identifiers up to the first 31 characters can be distinguished. The identifier mentioned above has a length of 32. Regards, Marc van Dongen
class system
Dear Group, I want to define two classes called Group and Ring. The Group class is for Abelian Groups (G,+), i.e. groups with a binary commutative operator ``+'' and an identity element normally denoted by ``0''. The Ring class is meant for cummutative rings (R,+,*) with binary operators ``+'' and ``*'', where ``+'' is commutative and has identity element ``0'', and ``*'' is commutative with identity ``1''. I want to use classes because I want to define rings in terms of existing rings later. A neat way to define the Group and Ring classes seems to have the Ring class being a subclass of the Group class (each Ring should inherit the properties for addition from some Group). Let R be a Ring defined as such. Now it seems to me I have to do something along the following lines: instance Num R where (+) r1 r2 = .. -- because r1 + r2 reads a lot better than ``plus r1 r2'' (*) r1 r2 = .. -- ,,* ,, times ,, fromEnum i = .. -- so one can say sexy things like 1::R and the like instance Group R where -- I only want to use (+) :: R - R - R but where I can use (*) :: R - R - R, which (to me) does not seem to be appropriate. Is there a proper (and simple) way of defining my Group and Ring which still allows me to overload (+) and (*)? Regards, Marc
how is this implemented
Dear ghc guru's, Could somebody tell me how (==) :: Integer - Integer - Bool is implemented in ghc? Is this done as (==) a b = (==) (a - b) 0 or is this done by calling some C-function which compares two integers? The reason why I want to know is that I have a function which does subtraction of integers where more than 40% of the execution time is spent. Depending on the way comparing for equality is implemented, I may, or may not, be able to squeeze a bit more performance out of my code. Thanks in advance, Marc Marc van Dongen, Computer Science Dept | phone: +353 21 903083 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
State Interface Description
Dear All, I am hoping that somebody will be able to help me with this before the hollidays are over:-) I am trying to locate a document with a name state_interface or something similar which is being named in some file in the 4-01 distribution. I have tried to locate it but failed. It seems as if it's not included in the disctibution any more. Is there anybody who has a recent copy? Regards, Marc
Is there anybody who can help me with this
Dear all, Hopefully somebody can help me out with this. I am looking for the file where the low level primops for operations on Integers are defined. I've had a look in Primops.h but that only includes cmpInteger# and a few friends. Where can I find the remaining ones? Any help would be greatly appreciated. Regards, Marc van Dongen Marc van Dongen, Computer Science Dept | phone: +353 21 903084 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
gmp.info
Dear all, According to the user guide (section 6.2) there should be a document calld gmp.info in the distribution. I tried to locate it, but it is not there. Is there anybody who can tell me where to get it. Regards, Marc van Dongen Marc van Dongen, Computer Science Dept | phone: +353 21 903084 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
Re: redirecting *.hi
Sergey: One small correction: The sed script should be: sed -e 's/.*\/\([^\/][^\/]*\)\.hs/$(E)\/\1.o, $(E)\/\1.hi/' Of course: :g/.*\/\([^\/][^\/]*\)\.hs/s//$(E)\/\1.o, $(E)\/\1.hi/ in vi should also work. Regards, Marc
Re: Scientific uses of Haskell?
: From: "Rob MacAulay" [EMAIL PROTECTED] : I have long been interested in Computer Algebra systems, and I : admit that one of the things that attracted me to Haskell were the : tantalizing hints that it would be ideal for mathematical : programming. [snip] : Would it also be true to say that FP offers the possibilty of : implementing more mathematically rigorous 'proof' systems as : well? I haven't had the time to find out more about this project. Also I don't know if you know about this yet. If not you may find the following interesting [quote from one of Bruno Buchberger's pages] The development of a new approach to mathematics that integrates "pure" and "algorithmic" mathematics in one common logical and software technological frame and is meant as an alternative to the currently prevailing "Bourbaki" formalization of mathematics. This research combines my past research experience in algorithmic mathematics, foundations of mathematics and computer science, didactics of mathematics, software and algorithm design, see publications since 1994. For more details, see the Theorema project http://www.theorema.org Regards, Marc van Dongen ___________ Marc van Dongen, CS Dept | phone: +353 21 903578 University College Cork, NUIC | Fax: +353 21 903113 College Road, Cork, Ireland | Email: [EMAIL PROTECTED]
Re: Haskell and Computer Algebra
[I cc'd this to haskell users since I couldn't find out what the name was of the forum to which the original thread belonged to. Appologies if I have made a mistake and I am upseting somebody.] Jerzy Karczmarczuk: : horrible complexity. Does it answer your question? ** It does. I just hadn't heared of the term you used before. Sometimes one has to resort to this kind of algorithms. The polynomial remainder e.g. is just the same as the result of a substitution: rem p1 (x - p2) == subs( x = p2, p1 ) where it is assumed that x is the leading term of x - p2. ** I am using Haskell for Gr{\"o}bner basis computations and conversions of such bases. I am quite happy with it: - I have implemented existing algorithms quite easilly. In particular I found list comprehensions very useful because they allow for an almost one to one translation from mathematical set comprehension to a program in Haskell; - The basic (Gr{\"o}bner basis) algorithms perform quite well. I have not yet been able to carry out a fair comparison with other CAS (Computer Algebra Systems) but the Haskell based algorithms do leave Maple *far* behind. For reasons mentioned earlier in this thread, I do not take that to be a proof for the superiority of Haskell based CA Algorithms:-) - Finally I have been able to implement some new algorithms without much problems (i.e. from a programmer's point of view). The new algorithms outperform the existing ones I was trying to improve. I hope to be able to report on this as soon as I have some more time. Regards, Marc