RE: Error when compiling with -O

2001-08-09 Thread Simon Marlow
There is a particular program (attached, called Spel.hs) which I cannot compile with the -O flag. The program goes through hsc alright but when gcc is trying to compile the generated c code it barfs pretty badly. The output from gcc is also attached. ghc version 5.00.1 (the same

RE: import with hiding

2001-08-09 Thread Simon Marlow
I can't repeat this with a small example, and I can't repeat it with the example you attached because it requires several other modules. Perhaps you could try the compile again, but add the flag '-ddump-rn-trace', and send us the output? Cheers, Simon

Eq Socket

2001-08-09 Thread Koen Claessen
Hi, In the GHC manual for the Socket library it says: data Socket -- instance of: Eq, Show But Socket does not seem to be an instance of Eq, as the following program shows: module Apa where import Socket foo :: Socket - Bool foo x = x == x When executing ghc -package net -c

RE: Eq Socket

2001-08-09 Thread Simon Marlow
In the GHC manual for the Socket library it says: data Socket -- instance of: Eq, Show But Socket does not seem to be an instance of Eq, Thanks, I've corrected this deficiency. Cheers, Simon ___ Glasgow-haskell-bugs mailing list

RE: GHC 5.00 problem compiling Y Combinator

2001-08-09 Thread Simon Peyton-Jones
It's an embarassing fact that you can make GHC's simplifier loop using fixpoint data types in the way you do. This is mentioned in the 'Secrets of the GHC inliner' paper. It's fixable, but it's nuisance to fix, and would slightly slow up the compilation of all programs, so we've never done it.

shared libraries in sun solaris

2001-08-09 Thread Siemens Entwicklungsteam
Hello, we are writing a haskell program that does a calculation for an intranet application. We assume that at peak times, several thousand users are going to use the program at the same time. Our problem is, that our binary file has several MBs and we don't know how to compile it (we are

RE: shared libraries in sun solaris

2001-08-09 Thread Simon Marlow
we are writing a haskell program that does a calculation for an intranet application. We assume that at peak times, several thousand users are going to use the program at the same time. Our problem is, that our binary file has several MBs and we don't know how to compile it (we are

RE: GC options. Reply

2001-08-09 Thread Simon Marlow
Hello! On Tue, Aug 07, 2001 at 10:47:50AM +0100, Simon Marlow wrote: - Compacting garbage collection is enabled when the residency reaches a certain percentage of the maximum heap size (if there is one). Could there be the possibility to set an absolute amount of memory

Socket

2001-08-09 Thread Koen Claessen
Hi, I am implementing a modest webserver using GHC (as an example program). I am using the Socket library. In the Socket library, the following function is provided: accept :: Socket - IO (Handle, HostName, PortNumber) Unfortunately, this is a blocking function, which means that the whole

Re: Socket

2001-08-09 Thread Keith Wansbrough
Koen writes: accept :: Socket - IO (Handle, HostName, PortNumber) Unfortunately, this is a blocking function, which means that the whole program blocks when it is waiting for a connection. [..] Ideally, I would like to integrate this with the function hSelect from the Select module.

RE: Socket

2001-08-09 Thread Simon Marlow
Koen writes: accept :: Socket - IO (Handle, HostName, PortNumber) Unfortunately, this is a blocking function, which means that the whole program blocks when it is waiting for a connection. [..] Ideally, I would like to integrate this with the function hSelect from the Select

Re: micro-rant

2001-08-09 Thread Florian Hars
On Thu, Aug 09, 2001 at 10:12:46AM +1000, Richard Watson wrote: I'd like to add my vote for this. Its removal would result in a nicer language specification, and would remove a obstacle that novice programmers sometimes stumble over. Yes, getting a sytax error if I write (x-1)*(-x-1) is a

getting started with the glasgow haskell compiler

2001-08-09 Thread Johansson Mikael
Hello! I'm just getting started using the glasgow haskell compiler and when I try to compile a simple program, named Hello.lhs, like this: module Main (main) where main = putStrLn Hello World end with the command ghc Hello.lhs I get the message on standard output: No definitions in file

free variable

2001-08-09 Thread Cagdas Ozgenc
Hi, I still have confusing regarding the following case: elemNum2 :: Int - [Int] - Int elemNum2 elem list = sum [ 1 | findElem - list, elem == findElem ] the function I wrote finds the number of occurences of an element in a list. If I change it to the following: elemNum2 elem list = sum [ 1

Re: getting started with the glasgow haskell compiler

2001-08-09 Thread Keith Wansbrough
Mikael Johansson writes: module Main (main) where main = putStrLn Hello World end with the command ghc Hello.lhs I get the message on standard output: No definitions in file perhaps you forgot the ''s? .lhs means literate Haskell file. Try module Main (main) where main =

RE: getting started with the glasgow haskell compiler

2001-08-09 Thread Simon Marlow
I'm just getting started using the glasgow haskell compiler and when I try to compile a simple program, named Hello.lhs, like this: module Main (main) where main = putStrLn Hello World end with the command ghc Hello.lhs I get the message on standard output: No definitions

RE: More feedback on Haskell 98 modules from the Programatica Team

2001-08-09 Thread Simon Peyton-Jones
| I don't think that this is a good idea. In particular because it may | break existing programs. Consider two modules with one common | name, e.g. | | module A where | f x = 1 | ... a lot of other definitions ... | module B where | f x = 2 | ... a lot more definitions but none

RE: More feedback on Haskell 98 modules from the Programatica Team

2001-08-09 Thread Simon Peyton-Jones
| However, I think there is a risk that name clashes may be | introduced. If module A defines and exports f, and imports | (qualified) and exports module B, which also defines f, then | a module C that imports A has two fs, both of which have the | qualified name A.f in C, even though there

RE: More feedback on Haskell 98 modules from the Programatica Team

2001-08-09 Thread Simon Peyton-Jones
| |Program 2: module A(module B, ...) where | |~~ import qualified B | | ... code that doesn't import B ... | | [...] | | I don't think it should matter whether B is imported | qualified or not; | I propose to remove the *unqualified* adjective

Re: micro-rant

2001-08-09 Thread Marcin 'Qrczak' Kowalczyk
Tue, 7 Aug 2001 20:20:49 -0700, Memovich, Gary [EMAIL PROTECTED] pisze: As long as were trying to clean up a final version of the Haskell 98 report, lets simplify it a little by getting rid of unary minus. I'm against removing it, even if compatibility was not an issue. Yes, it's an

Re: micro-rant

2001-08-09 Thread Marcin 'Qrczak' Kowalczyk
Thu, 9 Aug 2001 09:27:40 +0200, Florian Hars [EMAIL PROTECTED] pisze: Yes, getting a sytax error if I write (x-1)*(-x-1) is a real stumbling block. It's not a syntax error. -- __( Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA

from micro-rant to macro-feature

2001-08-09 Thread Memovich, Gary
I'm against removing it, even if compatibility was not an issue. Yes, it's an irregularity. But it's convenient, readable, and it allows using negative constants in patterns. -- __( Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/ \__/ ^^

Re: from micro-rant to macro-feature

2001-08-09 Thread Wolfgang Jeltsch
Hello, [...] I had either not realized, or forgotten, that unary minus could be used in patterns, that is indeed an important feature. Okay, that is right. Maybe it would be good to make the unary minus part of the numeric literal syntax and thus allowing only constants to be negated. This

Re: free variable

2001-08-09 Thread Wolfgang Jeltsch
Hello, [...] findElem - list findElem is a new variable, but list is not. elem==findElem here for some reason elem is not a new variable. Why does the rule only apply for - operation, but not == for example? Because - is no operator but belongs to the syntax of the whole list expression.

Generic programming bundle released

2001-08-09 Thread Ralf Laemmel
Folks, As a result of our work on functional transformation systems, large bananas, and traversal technology, we have come up with a new generic programming bundle, that is, Strafunski: http://www.cs.vu.nl/Strafunski/ The above web page lists papers (including a new draft on typed