Re: import ambiguity
On Wed, Oct 23, 2002 at 01:14:37PM -0400, Dean Herington wrote: With the program: import Exception main = let catch = Prelude.catch in catch (print ok) print hugs 98 version 20021021 gives: [...] Dependency analysis ERROR ImportAmbiguity.hs:2 - Ambiguous variable occurrence catch *** Could refer to: Prelude.catch Exception.catch It's a Hugs bug; more simply: module A where x = 1 module B where x = 4 module C where import A import B y = let x = A.x in x ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
RE: mod 0 results in core dump
Prelude 4 `mod` 0 Floating exception (core dumped) 'nuf said. ghc 5.04.1, solaris. It now raises an exception, and the fix is scheduled to be merged into 5.04.2. Cheers, Simon ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
glibc 2.3.1
Hi, some days ago I upgraded the GNU libc6 (also called glibc2) C library to version 2.3.1. It's only now that I notice that this wasn't a very good idea as it breaks GHC (version 5.04.1). basilisk Software/Haskell ghc --make Hello.hs ghc-5.04.1: chasing modules from: Hello.hs Compiling Main ( Hello.hs, ./Hello.o ) ghc: linking ... /usr/lib/ghc-5.04.1/libHSrts.a(RtsFlags.o)(.text+0xcf): In function `splitRtsFlags': : undefined reference to `__ctype_b' /usr/lib/ghc-5.04.1/libHSrts.a(RtsFlags.o)(.text+0xfb): In function `splitRtsFlags': : undefined reference to `__ctype_b' /usr/lib/ghc-5.04.1/libHSrts.a(RtsFlags.o)(.text+0x114): In function `splitRtsFlags': : undefined reference to `__ctype_b' collect2: ld returned 1 exit status I guess that the GNU library is broken, so this is not exactly a GHC bug report but more a word of warning. Cheers, Ralf ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
RE: glibc 2.3.1
some days ago I upgraded the GNU libc6 (also called glibc2) C library to version 2.3.1. It's only now that I notice that this wasn't a very good idea as it breaks GHC (version 5.04.1). basilisk Software/Haskell ghc --make Hello.hs ghc-5.04.1: chasing modules from: Hello.hs Compiling Main ( Hello.hs, ./Hello.o ) ghc: linking ... /usr/lib/ghc-5.04.1/libHSrts.a(RtsFlags.o)(.text+0xcf): In function `splitRtsFlags': : undefined reference to `__ctype_b' /usr/lib/ghc-5.04.1/libHSrts.a(RtsFlags.o)(.text+0xfb): In function `splitRtsFlags': : undefined reference to `__ctype_b' /usr/lib/ghc-5.04.1/libHSrts.a(RtsFlags.o)(.text+0x114): In function `splitRtsFlags': : undefined reference to `__ctype_b' collect2: ld returned 1 exit status I guess that the GNU library is broken, so this is not exactly a GHC bug report but more a word of warning. Upgrading libc isn't safe in general, without recompiling everything that depends on it. In this case it looks like libHSrts.a has captured some inline code from the old header files, which refers to things which don't exist in the new libc. Even if you still have the old libc installed, it still doesn't work because -lc tends to pick the latest version. Cheers, Simon ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
GLUT
Hi There. CVS ghc on Windows 2000 Pro compiling libraries/GLUT: ../../ghc/compiler/ghc-inplace -Wall -fglasgow-exts -package OpenGL -Iinclude '-#include HsGLUT.h' -cpp -DCALLCONV=stdcall -package-name GLUT -O -Rghc-timing -package ase -package OpenGL -split-o bjs-c Graphics/UI/GLUT/Window.hs -o Graphics/UI/GLUT/Window.o Graphics/UI/GLUT/Window.hs:140: No instance for (Eq Window) arising from use of `==' at Graphics/UI/GLUT/Window.hs:140 In the predicate expression: w == (Window 0) In the second argument of `($)', namely `if w == (Window 0) then Nothing else Just w' ghc: 43043828 bytes, 20 GCs, 2140648/4111904 avg/max bytes residency (3 samples), 8M in use, 0.01 INIT (0.01 elapsed), 0.52 MUT (0.58 elapsed), 0.45 GC (0.45 elapsed) :ghc make: *** [Graphics/UI/GLUT/Window.o] Error 1 Cheers Mike Thomas ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
interrupted system calls
Does anyone know what might be causing the following error from a program that uses System.system? Fail: interrupted Action: system Reason: Interrupted system call The shell command given to System.system runs and terminates with a non-zero exit code (actually 8). I expected to bind the exit result of the shell command and display it, but I did not expect the entire program to terminate instead. Unfortunately, small examples do not seem to trigger the problem. The application in which I noticed the problem is 'hi', the Haskell pseudo-interpreter. To demonstrate the behaviour, download and build hmake-3.06 (http://www.haskell.org/hmake) with any ghc from 4.08.2 to 5.04.1. (I can't test 4.06 or earlier.) There is no need to install anything: just type script/hi, then at the prompt enter any Haskell expression that throws a runtime error, such as 4`mod`0. The running interpreter is exited, whereas I expected the interpreter to continue (and on some platforms it does!) The fault is observed on Linux, but curiously not on Solaris, so maybe it is environment-related? Regards, Malcolm ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: interrupted system calls
Malcolm: Does anyone know what might be causing the following error from a program that uses System.system? Fail: interrupted Action: system Reason: Interrupted system call The shell command given to System.system runs and terminates with a non-zero exit code (actually 8). I expected to bind the exit result of the shell command and display it, but I did not expect the entire program to terminate instead. Unfortunately, small examples do not seem to trigger the problem. It sounds a little like a problem I had where trap 26 (I think this is a timer signal) was interrupting the subprocess. Nowadays I use this function: my_system :: String - IO ExitCode my_system xs = do -- putStrLn xs -- for debugging -- Bugfix for ghc (may not be needed in recent versions of GHC) rc - System.system (trap '' 26; ++ xs) unless (rc == ExitSuccess) $ putStrLn xs return rc The extra putStrLns are, of course, optional. -- Alastair ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs