Re: pre-4.07 inherits bug from 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])), [..] > > It hangs afterghc -c Main.hs; ghc -o run Main.o; ./run > > Thanks for the report; actually we know this bug is still there. It turns > out that there's no easy fix, and it's pretty tiresome to fix it properly. > The workaround remains: compile with -O. > > Reuben: could you mention this one in the mini-FAQ as a known bug? For the record: This is the same bug that causes certain programs compiled with profiling on to hang. A notable case is in compiling the compiler with profiling; PrimOp.lhs must be compiled with -O to avoid the profiled hsc hanging. --KW 8-)
RE: pre-4.07 inherits bug from 4.06
> 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])), > ((1,[0,1,0,0,1,0,0,0,0,2]),(-3,[0,1,0,0,1,0,0,-2,4,0])), > ((1,[0,1,0,0,1,0,1,0,0,1]),(1,[0,1,0,0,1,-2,3,0,2,-1])), > ((1,[0,1,0,0,1,0,2,0,1,0]),(3,[0,1,0,1,0,5,1,3,-3,2])), > ((1,[0,2,0,0,0,0,0,0,0,2]),(-5,[0,1,0,3,0,0,0,3,0,1])), > ((1,[0,2,0,0,0,0,1,0,0,1]),(-3,[0,0,4,-2,0,0,1,0,0,1])), > ((1,[0,2,0,0,0,0,2,0,0,0]),(-5,[0,1,0,3,3,0,1,0,0,0])), > ((1,[1,0,0,0,0,1,0,0,0,1]),(1,[1,0,0,0,1,0,0,-1,1,1])), > ((1,[1,0,0,0,1,0,0,0,0,1]),(1,[1,0,0,0,1,-1,1,0,1,0])), > ((1,[1,0,0,0,1,0,1,0,1,0]),(-5,[1,0,0,0,0,2,0,1,-1,1])), > ((1,[1,0,0,1,1,0,0,0,1,0]),(-5,[1,0,0,1,0,2,-1,1,-1,1])), > ((1,[1,0,1,0,0,0,0,0,0,1]),(1,[1,1,0,0,0,0,0,-1,1,1])), > ((1,[1,0,1,0,0,0,1,0,0,0]),(1,[1,1,0,0,-1,1,1,0,0,0])), > ((1,[1,1,0,0,0,0,0,0,0,1]),(1,[1,1,-1,1,0,0,0,0,1,0])) > ] > :: [((Int,[Int]), (Int,[Int]))] > in > putStr $ shows xs "\n" > > > It hangs afterghc -c Main.hs; ghc -o run Main.o; ./run Thanks for the report; actually we know this bug is still there. It turns out that there's no easy fix, and it's pretty tiresome to fix it properly. The workaround remains: compile with -O. Reuben: could you mention this one in the mini-FAQ as a known bug? Cheers, Simon
pre-4.07 inherits bug from 4.06
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])), ((1,[0,1,0,0,1,0,0,0,0,2]),(-3,[0,1,0,0,1,0,0,-2,4,0])), ((1,[0,1,0,0,1,0,1,0,0,1]),(1,[0,1,0,0,1,-2,3,0,2,-1])), ((1,[0,1,0,0,1,0,2,0,1,0]),(3,[0,1,0,1,0,5,1,3,-3,2])), ((1,[0,2,0,0,0,0,0,0,0,2]),(-5,[0,1,0,3,0,0,0,3,0,1])), ((1,[0,2,0,0,0,0,1,0,0,1]),(-3,[0,0,4,-2,0,0,1,0,0,1])), ((1,[0,2,0,0,0,0,2,0,0,0]),(-5,[0,1,0,3,3,0,1,0,0,0])), ((1,[1,0,0,0,0,1,0,0,0,1]),(1,[1,0,0,0,1,0,0,-1,1,1])), ((1,[1,0,0,0,1,0,0,0,0,1]),(1,[1,0,0,0,1,-1,1,0,1,0])), ((1,[1,0,0,0,1,0,1,0,1,0]),(-5,[1,0,0,0,0,2,0,1,-1,1])), ((1,[1,0,0,1,1,0,0,0,1,0]),(-5,[1,0,0,1,0,2,-1,1,-1,1])), ((1,[1,0,1,0,0,0,0,0,0,1]),(1,[1,1,0,0,0,0,0,-1,1,1])), ((1,[1,0,1,0,0,0,1,0,0,0]),(1,[1,1,0,0,-1,1,1,0,0,0])), ((1,[1,1,0,0,0,0,0,0,0,1]),(1,[1,1,-1,1,0,0,0,0,1,0])) ] :: [((Int,[Int]), (Int,[Int]))] in putStr $ shows xs "\n" It hangs afterghc -c Main.hs; ghc -o run Main.o; ./run -- Sergey Mechveliani [EMAIL PROTECTED]
RE: strange Prelude.chr bug
> > chr :: Int -> Char > > chr (I# i) | i >=# 0# && i <=# 255# = C# (chr# i) > >| otherwise = error ("Prelude.chr: bad argument") > > So a Haskell program that (perhaps inadvertently) uses a > Unicode character > will fail with ghc. Our Char type is currently only 8 bits. There's been some discussion on the ghc-users list about changing it to 32 bits, which with any luck will happen sometime before the next release. > When is ghc going to implement full Haskell? :) when is hbc going to reach version 1.0 ? :) Cheers, Simon