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
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
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
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
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.
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
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
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
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
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.
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
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
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
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
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 =
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
| 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
| 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
| |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
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
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
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/
\__/
^^
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
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.
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
25 matches
Mail list logo