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
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
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
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
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
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?
---
> --
> -
> 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
>
> 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
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
>> <>
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:
> -
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
"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:
-
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
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
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
> 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
"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
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}
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
19 matches
Mail list logo