Re: Integer -> Int conversion

1999-06-23 Thread Lennart Augustsson
Lennart Augustsson wrote: > Simon Marlow wrote: > > > > > Int arithmetic on GHC and Hugs is modulo 2^32, i.e. maxBound + 1. > > > > Actually, if we are in nit-picking mode, arithmetic is modulo (maxBound+1)*2. PS. I.e., if we interpret "modulo" in the right way since the result is interpreted as

Re: Can't compile HaskellDirect with GHC

1999-06-23 Thread George Russell
Apologies if this arrives on the mailing list twice, but I've just noticed that it hasn't arrived in the archive yet so maybe it's gone astray . . . The struggle continues . . . after the hacks suggested by Sigborn and myself, Utils went through, as did a lot of other HaskellDirect files, but no

Re: GHC panic when building prelude

1999-06-23 Thread George Russell
George Russell wrote: > > When building the GHC prelude (latest sources again), the following happened: > > rm -f Weak.o ; if [ ! -d Weak ]; then mkdir Weak; else find Weak -name '*.o' -print >| xargs rm -f __rm_food ; fi ; > ../../../ghc/driver/ghc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-tim

Re: Integer -> Int conversion

1999-06-23 Thread Lennart Augustsson
Simon Marlow wrote: > > Int arithmetic on GHC and Hugs is modulo 2^32, i.e. maxBound + 1. > Actually, if we are in nit-picking mode, arithmetic is modulo (maxBound+1)*2. -- Lennart

GHC panic when building prelude

1999-06-23 Thread George Russell
When building the GHC prelude (latest sources again), the following happened: rm -f Weak.o ; if [ ! -d Weak ]; then mkdir Weak; else find Weak -name '*.o' -print | xargs rm -f __rm_food ; fi ; ../../../ghc/driver/ghc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing -O -split-objs -odir Weak

Can't compile HaskellDirect with GHC

1999-06-23 Thread George Russell
The latest GHC chokes on the latest HaskellDirect file src/Utils.lhs. Here is a copy of error message and attached is the src/Utils.lhs file. It will be seen from the file that ghc is objecting to an explicit universal quantification. What should I do? ---

RE: compiling CVS of June 99

1999-06-23 Thread Simon Marlow
> -- > - > ghc -cpp -fglasgow-exts -Rghc-timing -I. -IcodeGen > -InativeGen -Iparser > -iutils:basicTypes:types:hsSyn:prelude:rename:typecheck:deSugar > :coreSyn:specialise:simplCore:stranal:stgSyn:simplStg:codeGen >

RE: compiling CVS of June 99

1999-06-23 Thread Simon Marlow
> I'm a bit concerned that the mem in use figure is 96M, and > yet the maximum > residency is reported as 58M - I'd expect the in use figure > to be at least > twice the maximum residency. Very strange. I remember now: the residency figure is a little inflated when using -G3 (or any -GN where

compiling ghc CVS tree

1999-06-23 Thread S.D.Mechveliani
To my >> I am trying to compile the ghc CVS tree of about June 5, 1999 > (ghc-4.04-pre ?) >> with ghc-4.02-linux-i386 for linux-i386. >> [..] >> ghc -cpp -fglasgow-exts -Rghc-timing -I. -IcodeGen -InativeGen -Iparser >> [..] >>-c parser/Parser.hs -o parser/Parser.o -osuf o >> <>

Re: Can't compile HaskellDirect with GHC

1999-06-23 Thread George Russell
George Russell wrote: > > "Sigbjorn Finne (Intl Vendor)" wrote: > > > > Untested, but changing the occurrence of '-syslib exts' > > to '-fglasgow-exts' in the first setting of > > SRC_HC_OPTS in src/Makefile may just take you past this > > one.. > In that case I get another error message: > -

RE: Can't compile HaskellDirect with GHC

1999-06-23 Thread Sigbjorn Finne (Intl Vendor)
Untested, but changing the occurrence of '-syslib exts' to '-fglasgow-exts' in the first setting of SRC_HC_OPTS in src/Makefile may just take you past this one.. --sigbjorn George Russell <[EMAIL PROTECTED]> writes: > > The latest GHC chokes on the latest HaskellDirect file src/Utils.lhs. > H

Re: Can't compile HaskellDirect with GHC

1999-06-23 Thread George Russell
"Sigbjorn Finne (Intl Vendor)" wrote: > > Untested, but changing the occurrence of '-syslib exts' > to '-fglasgow-exts' in the first setting of > SRC_HC_OPTS in src/Makefile may just take you past this > one.. In that case I get another error message: -

Re: Can't compile HaskellDirect with GHC

1999-06-23 Thread George Russell
The struggle continues . . . after the hacks suggested by Sigborn and myself, Utils went through, as did a lot of other HaskellDirect files, but now I get the following messages. So we have a bug in GHC itself, with a non-exhaustive match in ghc/compiler/typecheck/TcMatches.lhs. The version of

Re: Integer -> Int conversion

1999-06-23 Thread Marc van Dongen
Sigbjorn: : > The question is what should 0x8000 :: Integer : > become when its coerced into an int. : > : > GHC takes the lowest 32 bits. : > Advantage: Equality above maxBound still "works" aka above. : > Disadvantage: 0x + 1 == 0 ! : > : > Perhaps constant Int's larger than ma

Re: Can't compile HaskellDirect with GHC

1999-06-23 Thread Sven Panne
George Russell wrote: > [...] So we have a bug in GHC itself, with a non-exhaustive match > in ghc/compiler/typecheck/TcMatches.lhs. The version of GHC is up > to date (as of last night) from the CVS sources. [...] The same happens during the compilation of Green Card: [...] ghc -fvia-C -f

RE: Integer -> Int conversion

1999-06-23 Thread Simon Marlow
> On my machine the following program: > > > main = do putStr "According to ghc-4.02 (1-maxBound)^2 = " > > putStr $ show mult1 > > putStr "\nAccording to ghc-4.02 (maxBound-1)^2 = " > > putStr $ show mult2 > > where mult1, mult2 :: Int > >mult1 = (1

Re: Integer -> Int conversion

1999-06-23 Thread Andy Gill
"Sigbjorn Finne (Intl Vendor)" wrote: > > Hi, > > there's difference in behaviour of how Integers are coerced Ints > between Hugs(98) and ghc. > >Prelude> (0x8000 :: Int) > >Program error: {primIntegerToInt 2147483648} > >Prelude> (maxBound::Int) + 1 >-2147483648 >Prel

RE: Integer -> Int conversion

1999-06-23 Thread Sigbjorn Finne (Intl Vendor)
Andy Gill <[EMAIL PROTECTED]> writes: > > "Sigbjorn Finne (Intl Vendor)" wrote: > > > > Hi, > > > > there's difference in behaviour of how Integers are coerced Ints > > between Hugs(98) and ghc. > > > >Prelude> (0x8000 :: Int) > > > >Program error: {primIntegerToInt 2147483648}

RE: Can't compile HaskellDirect with GHC

1999-06-23 Thread Sigbjorn Finne (Intl Vendor)
George Russell <[EMAIL PROTECTED]> writes: > .. > ../../ghc/driver/ghc -fglasgow-exts -Rghc-timing -H16m -W > -recomp-O -O2-for-C -H30m -c Utils.lhs -o Utils.o -osuf o > ghc: ignoring heap-size-setting option (-H16m)...not the largest seen > Utils.lhs:22: parse error on input `(#' > > Com