RE: Bug in 4.08.1 hslib/concurrent/semaphores....

2001-01-11 Thread Simon Marlow
I'm using 4.08.1 on linux. I think that `waitQSemN' provided with the concurrent library is broken, ... Below is my fix: [ fix deleted ] Thanks, I've applied your patch and it'll be in 4.08.2. Cheers, Simon ___ Glasgow-haskell-bugs

RE: FFI problems?

2000-12-18 Thread Simon Marlow
I think it was fixed in 4.08.1. In any case 4.08 has a nasty bug in the NCG register allocator; you should move to 4.08.1 if you haven't already. It was fixed post 4.08.1, and will be in 4.08.2. From 'cvs log RnSource.lhs': ghc-4-08-1: 1.76.2.4 ...

RE: Exception.catch

2000-12-14 Thread Simon Marlow
I'm trying to use the catch function in the Exception library in hslibs. But I can't even get my programs to compile. It feels like this is a silly mistake on my side but I'll ask anyway. I've boiled it down to the following program: We changed the Exception interface around a bit

RE: Compiling 4.08.1 on NetBSD

2000-12-11 Thread Simon Marlow
The package in pkgsrc for 4.04 on NetBSD 1.5 doesn't properly compile. I've also tried just compiling 4.08.1 from source, using the hc files. They both fail at the same spot with similar errors, which are listed below. NetBSD 1.5 has switched to an ELF file format. I don't know if this

RE: getCPUTime: buggy?

2000-11-24 Thread Simon Marlow
Given getrusage(RUSAGE_SELF, t); cpu[0] = t.ru_utime.tv_sec; cpu[1] = 1000 * t.ru_utime.tv_usec; cpu[2] = t.ru_stime.tv_sec; cpu[3] = 1000 * t.ru_stime.tv_usec; in `getCPUTime.c', I don't understand return ((fromIntegral (I# (indexIntArray# frozen#

RE: getCPUTime: buggy?

2000-11-24 Thread Simon Marlow
Given getrusage(RUSAGE_SELF, t); cpu[0] = t.ru_utime.tv_sec; cpu[1] = 1000 * t.ru_utime.tv_usec; cpu[2] = t.ru_stime.tv_sec; cpu[3] = 1000 * t.ru_stime.tv_usec; in `getCPUTime.c', I don't understand return ((fromIntegral (I# (indexIntArray#

RE: ghc4.08.1 - bug in either foreign label or CString (or somewhere).

2000-11-17 Thread Simon Marlow
"foreign label ..." delivers a pointer to the named C object. - I think, the question is: What happens when this object is a pointer itself? When defining hello.c hello.h as follows, the example works fine: hello.c: #include "hello.h" const char hello[] ="hello, world"; hello.h:

RE: loop when running hsc

2000-11-02 Thread Simon Marlow
With ghc-4.08.1, running on Linux with -0 -O2-for-C, I get: loop With ghc-4.08, running on Solaris, with -O -O2-for-C, I get: hsc: no threads to run: infinite loop or deadlock? With ghc-4.08, running on Solaris, with -Onot, the compilation works. For the sources you will need the

RE: Bug in GHC's Garbage Collection?

2000-10-30 Thread Simon Marlow
Hi Christian, * Define the DllMain function in C (dllMain.c): #include windows.h #include Rts.h static char* args[] = { "ghcDll" }; BOOL STDCALL DllMain ( HANDLE hModule , DWORD reason , void* reserved ) { if (reason == DLL_PROCESS_ATTACH) { /* By now, the RTS

RE: ForeignObj.makeForeignObj

2000-10-30 Thread Simon Marlow
isn't right in 4.08 (or the CVS repo.) If the assumption is that ForeignObj cannot be mutated once created (which looks like being the case now since writeForeignObj is marked as deprecated), the defn should be something like: makeForeignObj :: Addr - Addr - IO ForeignObj

RE: ghc-CVS 001024: minor hslibs dependency bug

2000-10-25 Thread Simon Marlow
The dependency "concurrent" should be added to line 11 of /hslibs/net/Makefile so that it becomes: HSLIB_DEPS = lang text concurrent After that fix, 'make boot' goes through. Thanks, I've applied your fix. Cheers, Simon ___

RE: Program won't go away!

2000-10-19 Thread Simon Marlow
I think I've narrowed the problem down a bit further. It looks as if the reason GHC is hanging after the end of the main action is that there's a handle still open to a socket (to another process). If I hClose the handle explicitly before the end of the main action, the hClose action

RE: Posix.runProcess creates funny path for process table

2000-10-17 Thread Simon Marlow
SimonM, can you merge 1.5 into the 4-08-branch, please? done. Simon ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

RE: Signal handling still buggy

2000-10-10 Thread Simon Marlow
I think I found the most simple version to reproduce this bug. module Main where import Posix import IO main = do _ - installHandler sigUSR1 (Catch (return ())) Nothing -- will fail -- _ - installHandler sigUSR1 Ignore Nothing -- will work loop loop = do putStr " "

RE: Signal handling still buggy

2000-10-09 Thread Simon Marlow
On Mon, Oct 09, 2000 at 01:42:45PM +0200, Volker Stolz wrote: It seems that in 4.08 4.08.1 signal handling still seems to be flawed: I forgot to mention that this only happens when using job-control: 1) start the program 2) use Ctrl-Z to suspend 3) kill -USR1 4) fg to resume,

RE: type of stToIO

2000-10-06 Thread Simon Marlow
John's stToIO could be implemented in terms of runST, like so: stToIO :: (forall s . ST s a) - IO a stToIO st = return (runST st) maybe you want strictness here (i.e. applying seq to the result of runST before returning), maybe not. I'm sure there are arguments both ways.

RE: [Glasgow-haskell-bugs] NCG name mangling

2000-10-05 Thread Simon Marlow
first time poster, long time listener :-) Possibly a known one, but the NCG in 4.08.1 doesn't emit suitably decorated names when calling out to 'foreign import'ed functions that use the stdcall calling convention, e.g., sof$ cat foo.hs module Foo { foreign import stdcall decorateMe

RE: PPC port of ghc.

2000-10-04 Thread Simon Marlow
I noticed that GHC mentions a powerpc AIX port. I was wondering what the difficulty would be in porting GHC to Linux-PPC. Probably not too hard. The PPC code is still there, but hasn't been tested for a while (AFAIK, ghc 4.xx has never compiled on a PPC). You may need to extract some bits

We're changing out ailing list software

2000-10-04 Thread Simon Marlow
Dear glasgow-haskell-users glasgow-haskell-bugs, At haskell.org we're going to be switching the mailing lists from majordomo (which is somewhat old and clunky) to Mailman, which will amongst other things make my life a lot easier, provide better archives, add digest support and allow

RE: problems trying to build GHC 4.08.1

2000-09-29 Thread Simon Marlow
As suggested by the README, I did ./configure --exec-prefix=/home/sml/bin/ia32-linux --enable-hc-boot make boot make and then I get the following error: -- -- ===fptools== Finished making `all' in

RE: Magically growing files

2000-09-25 Thread Simon Marlow
Thanks for a great bug report. There was indeed a bug (at least one), which I've just fixed in the CVS sources. The read buffer was being accidentally flushed as a write buffer by the hClose. I'm still not quite sure why this caused the file to grow, however. Workaround: don't use

RE: Failed install of 4.08.1 (again)

2000-09-22 Thread Simon Marlow
Just for completeness - I saw a few mails about missing files in the binary dist. causing problems when installing on sparc. I have had the same problem and as one of the files I had problems with was not mentioned I thought I'd summarize: Some perl scripts are not created as they

RE: openFile, process file table full

2000-09-11 Thread Simon Marlow
The following program: module Main(main) where main:: IO() main = do { xs - mapM readFile (take 1000 (repeat "tmp")); return (); } Results in the error: Fail: resource exhausted Action: openFile Reason: process file table full tmp That looks reasonable - there's

RE: openFile, process file table full

2000-09-11 Thread Simon Marlow
Arguably, readFile is too strict: why is the file opened, if there aren't any characters needed. What is the motivation for opening the file eagerly? Once we've started reading lazilly, it's hard to generate errors. The file is opened eagerly so that any errors generated (such as if the

RE: Failed install of binary 4.08.1

2000-09-07 Thread Simon Marlow
Got a failed install on the binary release of ghc-4.08.1 using the sparc-sun-solaris2 package. Cya, Niall bash-2.03$ make install Configuring ghc, version 4.08.1, on sparc-sun-solaris2 ... Creating a configured version of ghc-4.08.1 .. cat: cannot open

RE: Algebraic datatype declaration without constructor

2000-08-03 Thread Simon Marlow
ghc-4.08 (the current version in http://www.haskell.org/ghc/dist/4.08/ghc-4.08-i386-unknown-lin ux.tar.gz) compiles the following program without error: module Main(main) where main = main data Foo = baz According to the Haskell 98 report, this is not legal Haskell. Are there are

RE: problem with mkdependHS options

2000-08-03 Thread Simon Marlow
If I give both the option -imydir _and_ -Xmydir to `mkdependHS' - even if the -X appears after the -i option on the command line - `mkdependHS' silently ignores the -X option. [This is with a vanilla GHC 4.06.] I would rather expect that the -X overrides the -i (and it would

RE: Link-time conflicts

2000-07-25 Thread Simon Marlow
Mon, 24 Jul 2000 22:16:32 +1000, Manuel M. T. Chakravarty [EMAIL PROTECTED] pisze: [...] we get an executable that dumps core (as the Pretty module in `-package text' also defines a data type `Doc'). With correct dependencies in Makefile Pretty should be compiled before Main. Then

RE: Error while building ghc-4.08 for FreeBSD

2000-07-25 Thread Simon Marlow
Hi there, I tried to build ghc-4.08 from the sorce distribution for FreeBSD. There's a FreeBSD port of 4.08 on the way. I'm currently trying to track down a couple of problems that people have reported. Which source distribution are you using here? The standard ghc-4.08-src.tar.gz or the

RE: Bug in GHC?

2000-07-25 Thread Simon Marlow
Nice bug! I think I've fixed this now. The fix will be backported to 4.08.1 after some testing. Cheers, Simon

RE: foreign import bug still in 4.08

2000-07-12 Thread Simon Marlow
| The ``foreign import'' bug for Float types is still present | in ghc-4.08. This bug is definitely present in the native code route. It would be good to know if the bug exists on the via-C route. If you recompile with -fvia-C (perhaps check with -v to be sure it really does go

RE: foreign import bug still in 4.08

2000-07-12 Thread Simon Marlow
Going via C is fine, as long as you -#include the relevant prototype for the C function you're calling. Otherwise the C compiler automatically promotes the arguments/result to doubles and you're hosed. There's been a great deal of discussion on the FFI list (as I'm sure you've

RE: foreign import bug still in 4.08

2000-07-12 Thread Simon Marlow
Sorry to be so dense, but my question was about the syntax of the -#include flag - where does it go (commandline? in the source? in a pragma?), and how is the filename specified? -#include="filename" -#include "filename" -#include filename etc. The on-line GHC documentation

RE: 4.08 does not build on HPUX

2000-07-11 Thread Simon Marlow
FWIW: I downloaded the src tarball, but had problems in building the 4.08 compiler. 1) ghc/compiler/main/CodeOutput.lhs did not import hPutStrLn or stderr from IO and failed to compile. 2) Building with 4.06 compiler, the build crashes in ghc/lib/std while trying to make the

RE: ghc-4.08 core dumps: probably parenthesis related

2000-07-05 Thread Simon Marlow
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

RE: The Revenge Of The Obnoxious Time Module...

2000-06-19 Thread Simon Marlow
I took a look (or maybe some more) at the well-known, totally buggy Time module... I think, I sorted out the main problems and fixed them: Comitted, thanks! Simon

RE: pre-4.07 inherits bug from 4.06

2000-06-14 Thread Simon Marlow
ghc-pre-4.07-2613-i386-unknown-linux.tar.gz inherits this bug from ghc-4.06: main = let xs = [((1,[0,0,0,0,2,0,0,0,0,2]),(-5,[0,0,0,0,1,0,3,3,0,1])), ((1,[0,1,0,0,0,1,0,0,0,1]),(-5,[0,1,0,0,0,1,0,0,0,1])),

RE: strange Prelude.chr bug

2000-06-13 Thread Simon Marlow
Fail: Prelude.chr: bad argument nofib/real/compress2 fails with the same message, for us. We haven't investigated. Perhaps it's the same bug. With a quick grep through the two programs, my guess is that 'toEnum' is being specialised at type Char to an internal function 'chr', and

RE: Heap overflow is not catched

2000-06-09 Thread Simon Marlow
grepping through sources suggests that nobody tried to implement this, only the exception constructor exists... OTOH stack overflow works. import Exception main:: IO () main = print (length (l++l)) `catchAllIO` print where l = [0::Int ..] Yes, I know: heap overflow is somewhat

RE: bug in ghc, hugs, or green-card

2000-06-02 Thread Simon Marlow
Simon Marlow [EMAIL PROTECTED] writes: So, the question is, "Should readFile on a directory throw an IO error?" If so, then there is a bug in Hugs; if not, there is a bug (or at least a severe misfeature) in Green Card (and a bug in the ghc libraries, which do t

RE: bug in ghc, hugs, or green-card

2000-06-01 Thread Simon Marlow
So, the question is, "Should readFile on a directory throw an IO error?" If so, then there is a bug in Hugs; if not, there is a bug (or at least a severe misfeature) in Green Card (and a bug in the ghc libraries, which do throw an IO error). I rather think that openning a directory fail,

RE:

2000-05-31 Thread Simon Marlow
May I know what happened? Regards, xu na PS: panic! (the `impossible' happened): Lex.popContext: empty context Please report it as a compiler bug to [EMAIL PROTECTED] You probably have a parse error in your file. This error message has improved somewhat in recent

RE:

2000-05-30 Thread Simon Marlow
When compiling ghc-4.06 I get this error message: ../driver/ghc-inplace -I../includes -I. -Iparallel -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith

RE: ghc build on HP-UX

2000-05-30 Thread Simon Marlow
Hmm. I would guess that your gcc is using the native HP/UX assembler and not GNU as, so it doesn't understand the .file directive. If you sent us the output of make EXTRA_HC_OPTS=-optc-v we could check that hypothesis. However ... Here it is, hope it helps: sorry, I

RE: 4.07 branch failing to build w/ 4.06?

2000-05-26 Thread Simon Marlow
I pulled down the 4.07 branch this morning and tried to build it with 4.06. Unfortunately, I get this: ../../driver/ghc-inplace -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing -O -package-name std -static -split-objs-c PrelIOBase.lhs -o PrelIOBase.o -osuf o Warning:

RE: URI.relativeTo type signature in comment (URI - URI - URI)

2000-05-25 Thread Simon Marlow
Tue, 23 May 2000 07:03:56 -0700, Simon Marlow [EMAIL PROTECTED] pisze: I believe I've fixed this one now. Erm, but there must be another bug. Its effect is fatal error: evacuate: THUNK_SELECTOR: strange selectee 27 The best way to reproduce it that I could found is the following

RE: underscore does not start a varid

2000-05-25 Thread Simon Marlow
Hi, my program uses (data-) variables beginning with _. This is legal Haskell 98 and Hugs accepts it. GHC 4.06 thinks these are constructors. This was indeed a bug in 4.06, but we've fixed it since and the fix will be in the upcoming 4.07. Incedentally, the bug was that identifiers

RE: GHC crashes: the `impossible' happened

2000-05-24 Thread Simon Marlow
I have a simple Haskell source file that uses unboxed tuples and causes GHC-4.07 (from the CVS repository last week) to crash, with or without optimization. The source (Bug.hs) is: module Bug (scaleInt) where import PrelGHC scaleInt :: (# Int, Int #) - Int - Int scaleInt ival i

RE: URI.relativeTo type signature in comment (URI - URI - URI)

2000-05-23 Thread Simon Marlow
Yes, although it's quite big as a bug report. http://qrczak.ids.net.pl/Haber-0.1.tar.gz It's Linux. $ make $ COLUMNS=70 LINES=25 ./haber bug.html I could not find a repeatable example which fails on an 80x25 screen now (this one fails on 128x48 too). It fails with "EVACUATED

RE: URI.relativeTo type signature in comment (URI - URI - URI)

2000-05-23 Thread Simon Marlow
Yes, although it's quite big as a bug report. http://qrczak.ids.net.pl/Haber-0.1.tar.gz It's Linux. $ make $ COLUMNS=70 LINES=25 ./haber bug.html I could not find a repeatable example which fails on an 80x25 screen now (this one fails on 128x48 too). It fails with "EVACUATED object

RE: ghc -v always makes gcc-2.95.1 dump core?

2000-05-15 Thread Simon Marlow
"Signal 127"?! I don't understand this. Doesn't seem to happen here, but it may be a bug in your 'as'. GHC's native code generator is now used by default when GHC is invoked without -O, so the problem isn't your gcc, but more likely your binutils. Cheers, Simon

RE: Blocking I/O FIFOs

2000-05-15 Thread Simon Marlow
Grrr. This works: module Main (main) where import IO import Posix import PosixUtil import Concurrent main = do h - openFile "/tmp/fifo" ReadMode fd - handleToFd h threadWaitRead (fdToInt fd) line - hGetLine

RE: Blocking I/O FIFOs

2000-05-12 Thread Simon Marlow
Thu, 11 May 2000 06:39:10 -0700, Simon Marlow [EMAIL PROTECTED] pisze: The solution, if you're interested, is to open the file in blocking mode and set O_NONBLOCK later on with an fcntl(). It means that waiting for the writer blocks the whole program, right? Yes, and that's another

RE: Blocking I/O FIFOs

2000-05-12 Thread Simon Marlow
It is certainly better after a fix, at least for single-threaded programs which work perfectly. With native threads (BTW, are they expected to work soon?) it would work well too. Perhaps... but pthreads emulated in user-space would suffer from the same problems as GHC, because they

RE: Blocking I/O FIFOs

2000-05-10 Thread Simon Marlow
However I think I am getting exactly the same problem. (On Solaris/Sparc, using CVS GHC compiled by itself.) However instead of using pipes I am using sockets. Even worse, if the party of the second part closes the handle attached to the socket, and the Haskell process to which the

RE: Blocking I/O FIFOs

2000-05-10 Thread Simon Marlow
I encountered the problem too a few days ago. It does not wait for another process to open the fifo, but returns EOF immediately. It works only when another process opened the fifo for writing before we opened it for reading. The problem happens in ghc-4.06 and 4.07. It worked OK in

RE: Blocking I/O FIFOs

2000-05-10 Thread Simon Marlow
ghc-4.07 can´t read from Unix-FIFOs because a hGetLine will throw an EOF. module Main (main) where import IO main = do h - openFile "/tmp/fifo" ReadMode line - hGetLine h putStrLn line hClose h dhs@monster [15:46:31] mkfifo /tmp/fifo; ./test Fail: end of file

RE: bug in foreign import (for floats)

2000-05-10 Thread Simon Marlow
ghc-4.06 (downloaded from the ftp site; I haven't tried the current CVS version) appears to have a bug in the FFI, demonstrated by the following code using Floats. [ snip ] I believe this bug was fixed recently (foreign imports with non-IO return types weren't being handled properly).

RE: If this bug is important let me know

2000-05-08 Thread Simon Marlow
Mike Jones wrote: I get this error with 4.05. If it is important, I can send source. c:/tmp/ghc5016.hc:30113: warning: `X1Z_closure' was declared `extern' and later `static' This is one of GHC's classics. But it isn't a real error, only a warning from the C compiler, which you can

RE: fixed Heap size??

2000-04-25 Thread Simon Marlow
I got the following problem executing my program: mpirun -np 52 truth.exe +RTS -H128m -M128m -RTS ... Heap exhausted; Current maximum heap size is 67108864 bytes; use `+RTS -Msize' to increase it. Although I increased manually the Heap-size, this option seems to be ignored. I compiled

RE: Posix.FileMode

2000-04-14 Thread Simon Marlow
hslibs/posix/doc/posix.sgml says that FileMode is an instance of Eq and Integral, but in reality it is not. There is no way of examining FileModes! I will have to reimplement an interface to stat() myself. Yes, it's a bit sad. The POSIX library needs a complete re-implementation, but I'd

RE: ghc/rts/RtsUtils.c

2000-04-14 Thread Simon Marlow
../driver/ghc-inplace -I../includes -I. -Iparallel -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wbad-function-cast -O2 -optc-DCOMPILING_RTS -static -O2

RE: Unhelpful Haskell error messages

2000-04-13 Thread Simon Marlow
I think test9: fatal error: resurrectThreads: thread blocked in a strange way qualifies. hehe ;) Better send me that program. Simon

RE: ghc/rts/RtsUtils.c

2000-04-12 Thread Simon Marlow
OK, this is why I think it's happening. Stg.h (#include'd via Rts.h) sets the macro _POSIX_C_SOURCE. This prevents Sparc/Solaris' sys/time.h defining "struct timeval" and gettimeofday. (Indeed if I add the line #undef _POSIX_C_SOURCE to RtsUtils.c just before include sys/time.h it

RE: Bootstrapping ghc with -O fails

2000-04-12 Thread Simon Marlow
Building 4.07 with 4.06 works fine, but in a second bootstrapping phase the fresh 4.07 can't compile itself, at least not with "SRC_HC_OPTS += -O". Without -O everything seems to work... We know about this one. I'm about to commit a hack, and Simon will follow up with the Real Fix in due

RE: compiled program loops

2000-04-11 Thread Simon Marlow
In the real application I also get the error: bingraph: fatal error: evacuate: THUNK_SELECTOR: strange selectee 27 which I'm hoping is related, because I have no idea what it means and I can't reproduce this in an example program. Any idea where I should be looking for the cause of this ?

RE: Catching black holes

2000-04-10 Thread Simon Marlow
Consider import Exception hiding ( catch ) main = tryAll (let x = x in x :: ()) = print (Using current CVS; WinNT box). My understanding was that GHC exceptions could catch blackholes. But the above program causes: bash% ../driver/ghc-inplace Blackhole.hs -syslib

RE: Profiling.h in the attic

2000-04-04 Thread Simon Marlow
==fptools== gmake boot --no-print-directory -r; in /usr/local/pub-bkb/ghc/fptools/ghc/includes -- -- gmake[2]: *** No rule to make target `Profiling.h', needed by `mkNativeHdr.o'. Stop. gmake[1]: *** [boot] Error 1

RE: Profiling.h in the attic

2000-04-04 Thread Simon Marlow
Simon Marlow wrote: Yes, I removed Profiling.h from ghc/includes and added it to ghc/rts. You might need to 'make boot' Actually it was gmake boot that was falling over. However I seem to have fixed that by doing "gmake depend" in ghc/includes (the .depend file

RE: happy/LALR.hs doesn't compile

2000-03-31 Thread Simon Marlow
With sources (and GHC) as checked out at 3am BST today: /usr/local/pub-bkb/ghc/ghc-latest/bin/ghc -cpp -fglasgow-exts -O -H12m -c LALR.lhs -o LALR.o -osuf o LALR.lhs:314: Variable not in scope: `newArray' LALR.lhs:316: Variable not in scope: `freezeArray' LALR.lhs:336: Variable

RE: ghc/compiler/utils/FastString.lhs won't compile (suspect version skew)

2000-03-23 Thread Simon Marlow
Er, has this bug report been lost? It doesn't seem to have been dealt with . . . There may be bootstrapping problems when building GHC with a snapshot (post-4.06) build, because we only support the following scenarios: - bootstrapping GHC with a released version -

RE: standard library conformance

2000-03-23 Thread Simon Marlow
As I discovered, ghc doesn't implement the standard library function "doesFileExist" correctly. I can't repeat this problem on Linux, so it may be a HP-specific bug. Can anyone with an HP box verify it? Cheers, Simon

RE: virtual timers and System.system

2000-03-17 Thread Simon Marlow
On FreeBSD using ghc 4.04, long running commands executed with System.system are being interrupted by virtual alarms leading to errors such as: o Fail: interrupted Action: system Reason: system command interrupted rm -f xxx yyy o Virtual timer expired o gcc: Internal

RE: virtual timers and System.system

2000-03-17 Thread Simon Marlow
The correct handling would be: - block SIGALRM/SIGVTALRM/SIGPROF - *then* fork() (else you have a race condition where the child could receive *and handle* the signal) This race condition is harmless, I think. The VTALRM handler just increments a counter, and we're about to blow away this

RE: GMP compilation blues.

2000-03-17 Thread Simon Marlow
`/usr/local/pub-bkb/ghc/fptools/ghc/rts/gmp/mpz' ../driver/ghc-inplace -I../includes -I. -Iparallel -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wbad-function-cast

RE: hsc crashes when compiling GHC 4.06 sources

2000-03-16 Thread Simon Marlow
I downloaded the sources from GHC 4.06, made the shallow tree, added a build.mk in mk/ with -H80, later with -H80 -O2, made ./configure in ghc/ and ./configure in the main tree, (copied both .y files because happy doesn't work on links done with lndir -- it's only NT), said make boot and

RE: gmp configure (fwd)

2000-03-16 Thread Simon Marlow
Reuben Thomas wrote: I already came across this, and Sigbjørn sent me a fix, which should soon be in CVS. Just in case it's not, it follows below. I found that I also needed to change rts/gmp/configure.in so that the first call to AC_INIT occurred after the setting of the three

RE: gmp configure (fwd)

2000-03-16 Thread Simon Marlow
Simon Marlow wrote: What version of autoconf is this, just out of interest? autoconf --version Autoconf version 2.13 Oh no, don't tell me I've got to install a private copy of yet another bit of software to compile GHC . . . It builds fine for me here with autoconf 2.13 on Solaris

RE: gmp configure (fwd)

2000-03-16 Thread Simon Marlow
Simon Marlow wrote: It builds fine for me here with autoconf 2.13 on Solaris. Perhaps you have some old configure files lying around in ghc/rts/gmp/*. Try blowing away your gmp subtree and starting again. After deleting the whole of ghc, rerunning autoconf several times (why isn't

RE: bug report

2000-03-15 Thread Simon Marlow
Compiling the following with ghc-4.06 produces an erroneous error message: module O where a :: Int a = 1 b :: Int b = 2 c :: Int c = 3 f :: Int - Bool f i = case i of a - True b - True c - True The compiler complains: o.hs:14: Pattern match(es) are

RE: gmp configure (fwd)

2000-03-15 Thread Simon Marlow
On the subject of bugs for which fixes are found which don't seem to make it into the CVS repository for a while, why exactly does RtsUtil.h still contain the line extern StgStablePtr errorHandler; when "errorHandler" isn't actually defined anywhere? ("extern" of course doesn't

RE: Signals once again.

2000-03-15 Thread Simon Marlow
The following code does nothing one sent a -USR1 but "succeeds" (i.e. fails with "User defined signal 2") on -USR2. I'd be happy if someone could point me to the important thing I'm constantly missing. Oh dear. It looks like signal handling support has been broken for some time. A patch to

RE: threadWaitRead on a closed Fd - - -

2000-03-15 Thread Simon Marlow
causes the entire program to crash. (Not just the thread that is doing the threadWaitRead.) Is this not a little drastic? To run the attached code use ghc -syslib posix -syslib concurrent -cpp ThreadWaitFail.hs -o TWF ./TWF You're right, this is a bug. But I'm not sure what to do

RE: make all - SocketPrim error

2000-03-15 Thread Simon Marlow
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

RE: cvs: make all - error PackedString.lhs

2000-03-13 Thread Simon Marlow
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. A note for GHC-from-CVS afficionados: Due to versionitis which is not reflected in GHC's version number, you probably have to

RE: bug in layout parsing

2000-03-13 Thread Simon Marlow
ghc 4.06, solaris 5.7, distributed binaries. the extra closing brace isn't caught in time... main = do putStr "hello" } hence: panic! (the `impossible' happened): Lex.popContext: empty context Thanks for the report. This one was fixed recently in the CVS

RE: missing Native?

2000-03-13 Thread Simon Marlow
It appears that the library Native has disappeared between 4.04 and 4.06, in the big hslibs reorganisation. Can we expect it to return, and if so, when will it come back? I don't think it's going to return, but if there is something you rely on from it, then we should attempt to support it

RE: lex 1x23 == [(123,)] reads 1x23 == [(123,)]

2000-03-13 Thread Simon Marlow
They should not. Thanks, this is now fixed (well partially, we don't attempt to lex hexadecimal literals any more). Cheers, Simon

RE: _ is not always small (syntactically :-)

2000-03-09 Thread Simon Marlow
GHC's lexer (function Lex.mk_var_token) treats names starting with an underscore followed by an uppercase letter as a constructor (conid) and not as a variable (varid): module Foo where data T = _ThisWorksAlthoughItShouldNot _ThisShouldWorkButItDoesNot = '?' A comment in the

RE: -O2 == crash

2000-03-09 Thread Simon Marlow
The following code crashes when compiled with -O2. With -O it does not crash. Some trivial modifications make the crash go away. Sorry, I can't repeat this one. As far as I can tell, using -O2 does three things - it forces -fvia-C (on by default anyway) - it passes -O2 to

RE: -O2 == crash

2000-03-09 Thread Simon Marlow
2.95.1 With -O -O2-for-C it still crashes. With -O it does not. With -O2-for-C it does not. (gdb) bt #0 0x804932a in Main_zn_fast2 () #1 0x500c0444 in ?? () #2 0x500c1fa4 in ?? () #3 0x468bfc45 in ?? () Cannot access memory at address 0x8908468b. We could investigate further,

RE: hslibs/tools/DtdToHaskll

2000-03-09 Thread Simon Marlow
(when doing gmake in the fptools directory.) ../../../ghc/driver/ghc-inplace -o DtdToHaskell -cpp -fglasgow-exts -syslib text-H40m -OnotDtdToHaskell.o DtdToTypeDefPP.o /usr/local/pub-bkb/ghc/fptools/hslibs/data/libHSdata.a(FiniteM ap__1.o)(.text+0x38): undefined reference to

RE: StablePtr Integer == crash

2000-03-08 Thread Simon Marlow
I believe I've fixed the foreign export problems now, at least the examples I've tried now work. However, this is a fairly large change so it may need a couple of days to settle down. Cheers, Simon

RE: GHC Bug on NT 4.0, threading problem?

2000-03-07 Thread Simon Marlow
You mean this one: subl $RESERVED_C_STACK_BYTES + 4*SIZEOF_LONG,%esp subracting from %esp caused the program to exit? Surely not! Specifically, anything after the subl large number,%esp did not happen. Perhaps causing an uncaught page fault? (I dont think that the subl

RE: StablePtr Integer == crash

2000-03-07 Thread Simon Marlow
Martin Kowalczyk writes: $ ghc -fglasgow-exts -c Crash.hs $ ghc -c crash.c $ ghc -fglasgow-exts Crash.o Crash_stub.o crash.o -o crash $ ./crash 10302 zsh: segmentation fault ./crash $ ghc --version The Glorious Glasgow Haskell

RE: GHC Bug on NT 4.0, threading problem?

2000-03-06 Thread Simon Marlow
Bug (1): A totally clean, top of the CVS tree does not work on NT 4.0. Behavior: returns with no result, any program. Strange: Adding '+RTS -s' makes things work fine. I think that there is not enough stack space on the C stack, and the "change %esp register is failing us". The alloca

RE: This could be a bug

2000-03-06 Thread Simon Marlow
Hello lovely GHC people. I may have found a bug. If I leave a hanging right brace where one might have been for a 'let' expression, eg: let env' = extendVarEnvList rho env } I then receive the message: panic! (the `impossible' happened): Lex.popContext: empty context

RE: Strange crashes with ForeignObj + foreign export dynamic

2000-03-02 Thread Simon Marlow
I believe this bug is the weak ptr bug I fixed last week. In any case, the example works with the latest sources (and I verified that it indeed crashes under ghc-4.06). The story (not part of the bug report). I've made most of a Haskell-Perl interface for fun. Closures are convertible in

RE: Profiling.c:462: parse error before `'

2000-03-02 Thread Simon Marlow
Hello again, When making cvs it halts because of a Profiling.c:462: parse error before `' I have appended a log. 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

RE: Profiling.c:462: strucuture has no member named `emitted'

2000-03-01 Thread Simon Marlow
I just updated cvs and now make fails because of a Profiling.c:462: strucuture has no member named `emitted' thingy. Log appended. my bad; now fixed. Cheers, Simon

<    3   4   5   6   7   8   9   10   11   >