Bug in GHCi

2001-10-31 Thread Koen Claessen
Hi, I discovered two bugs in GHCi. I am using GHC5.02 on Linux. The first bug has been there for some time now. If I start GHCi with a module `A.hs', which either does not exist itself, or which includes modules that not exist, then GHCi terminates with an error message. This is rather

RE: installHandler, sleep, and interrupts.

2001-10-31 Thread Simon Marlow
I later ran into another problem that may or may not be related with the first. This is the program I am running: module Main where import Posix main = do installHandler sigCONT (Catch (putStrLn - resumed -)) Nothing forever $ do c -

RE: Bug in GHCi

2001-10-31 Thread Simon Marlow
I discovered two bugs in GHCi. I am using GHC5.02 on Linux. The first bug has been there for some time now. If I start GHCi with a module `A.hs', which either does not exist itself, or which includes modules that not exist, then GHCi terminates with an error message. This is rather

ghc -O

2001-10-31 Thread Koen Claessen
Simon Marlow wrote: | Thanks, I've fixed both of these. Great! Now I have discovered another bug in GHC. It happens very often that I get a the impossible happened when I run GHC with the -O flag. Here is an example. I attached two files. When running ghc -o --make FormParse.hs, I get the

undefined reference to `PrelGHC_Z2H_static_info'

2001-10-31 Thread Ralf Hinze
Hi, I get a link error when I compile a program with -O2 Lexer2.o: In function `Lexer2_zdszdwlexCharLit_closure': Lexer2.o(.data+0x46c): undefined reference to `PrelGHC_Z2H_static_info' Lexer2.o: In function `Lexer2_zdszdwlexStrLit_closure': Lexer2.o(.data+0x484): undefined reference to

RE: gtk+hs and libgmp

2001-10-31 Thread GĂ©rard Milmeister
On Wed, 2001-10-31 at 15:49, Simon Marlow wrote: Here is the output: 1. Main.out from a link that succeeds. 2. GtkHelloWorld.out, a sample program from gtk+hs, compiled with ghc -v -fglasgow-exts -lgtkHS GtkHelloWorld.hs `gtkhs-config --cflags` `gtkhs-config --libs` `gtk-config

RE: gtk+hs and libgmp

2001-10-31 Thread Simon Marlow
That would be one solution, yes. On your system, if you remove /usr/lib/libgmp.a (and /usr/lib/libgmp.so if you have one), does it work? You only need these files if you intend to build any software which depends on having GMP version 2, which is unlikely since GMP 3 is

problem compiling

2001-10-31 Thread Juan Ignacio Garca Garca
hello, I installed ok the rpm-packages on linux (Mandrake 8.1), but when I try to compile something the following message appears: f2.hs:1: failed to load interface for `Prelude': Bad interface file: ./Prelude.hi does not exist Action: openFile Reason: No such file or

'Forall' Polymorphism Question

2001-10-31 Thread Ashley Yakeley
I note that GHC by default gives this type for return id: (return id) :: forall m a. (Monad m) = m (a - a) Wouldn't this be more general: (return id) :: forall m. (Monad m) = m (forall a. a - a) (return return) :: forall m. (Monad m) = m (forall m1 a. (Monad m1) = a - m1 a) ...?

Re: varying number of arguments restriction

2001-10-31 Thread Fergus Henderson
On 30-Oct-2001, Hal Daume [EMAIL PROTECTED] wrote: I'm curious why the following code is invalid (from a language design point of view): foo :: [(Int, String)] - String foo [] = foo = snd . head ghc complains: Varying number of arguments for function `foo' I don't understand

RE: 'Forall' Polymorphism Question

2001-10-31 Thread Simon Peyton-Jones
Any system that allows a parametric type variable to be instantiated by a for-all type is called impredicative, I think. Example: Maybe (forall a. a-a), or as you have below (m (forall a. a-a)). I don't understand all (well, any) of the details, but I understand that impredicative systems

how to store new values in variables?

2001-10-31 Thread Anders Elfgren
Hi, its me with the dungeon master-game again.. I'm in the process of making me able to move around, which I have succeeded with. Kind of. Remember the map type Pic = [[Char]] maplevel1 = [##, ##, ### #, #

Re: HaXml, memory usage and segmentation fault

2001-10-31 Thread Joe English
An update on Dmitry's problems with HaXml memory usage: + Compiling HaXml and the driver program with ghc -O helps a *lot*. + Using the version of HaXml that comes preinstalled with GHC (-package text) helps even more. There is a slight difference in the 'Pretty' module (which is