Re: Random number generator

2004-01-15 Thread Tomasz Zielonka
On Thu, Jan 15, 2004 at 11:00:24PM +0100, Stefan Reich wrote: > > How many ints do you want to generate? I don't think it is possible to > generate an infinite lazy list in this case because this interferes with > monad semantics. If you want a fixed number of random ints, try this: > > drawInt

Re: Fail to compile ghc-6.2 on a Sun/Sparc

2004-01-15 Thread mai99dnn
Ok, with the right versions of gcc and make and great support of my tutor ghc-6.2 is compiled succesfully on the sun :-) Thanks to all Patrick Am Donnerstag, 15. Januar 2004 12:10 schrieb Simon Marlow: > > There is the following version installed. The version seems to > > be greater than that v

Re: Random number generator

2004-01-15 Thread Stefan Reich
That's definitely not a message for the bugs list :-) Please have a look at this page: http://www.zvon.org/other/haskell/Outputrandom/getStdRandom_f.html It gives the correct signature for drawInt as you defined it: Int -> Int -> IO Int The signature you gave doesn't work because it specifies

RE: Fail to compile ghc-6.2 on a Sun/Sparc

2004-01-15 Thread Simon Marlow
> There is the following version installed. The version seems to > be greater than that versionnumber that is needed. > While I'm waiting I'll compile the gnu-gcc... > > bash-2.05$ gcc --version > gcc (GCC) 3.2.1 > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see t

Re: Fail to compile ghc-6.2 on a Sun/Sparc

2004-01-15 Thread Patrick Scheibe
Am Donnerstag, 15. Januar 2004 10:35 schrieb Simon Marlow: > > Hmm, the patch works fine, but compilation stops when building > > libraries/base/GHC/List.o > > It seems to me that some library of the system makes trouble. > > I dont think > > thats a ghc errror: > > > > rm -f GHC/List.o; if [ ! -d

Re: Fail to compile ghc-6.2 on a Sun/Sparc

2004-01-15 Thread Oliver Braun
* Patrick Scheibe <[EMAIL PROTECTED]> [2004-01-14 22:56 +0100]: > ../../ghc/utils/hsc2hs/hsc2hs-inplace -Iinclude -I../../ghc/includes -I. > GHC/Unicode.hsc > Unicode.hsc: In function `main': > Unicode.hsc:126: `wint_t' undeclared (first use in this function) > Unicode.hsc:126: (Each undeclared

Random number generator

2004-01-15 Thread Gwoing Yu
Hi,   I need some assistances in calling random number generator using 6.0.1 haskell compiler. To return a list of random int [Int], I have tried  the following:   drawInt :: Int->Int -> [Int]drawInt x y =  getStdRandom (randomRs (x,y))   It has a type error. I would appreciate if you know how to

RE: Fail to compile ghc-6.2 on a Sun/Sparc

2004-01-15 Thread Simon Marlow
> Hmm, the patch works fine, but compilation stops when building > libraries/base/GHC/List.o > It seems to me that some library of the system makes trouble. > I dont think > thats a ghc errror: > > rm -f GHC/List.o; if [ ! -d GHC/List_split ]; then mkdir > GHC/List_split; else > /usr/bin/fi

Re: Fail to compile ghc-6.2 on a Sun/Sparc

2004-01-15 Thread Patrick Scheibe
Hmm, the patch works fine, but compilation stops when building libraries/base/GHC/List.o It seems to me that some library of the system makes trouble. I dont think thats a ghc errror: rm -f GHC/List.o; if [ ! -d GHC/List_split ]; then mkdir GHC/List_split; else /usr/bin/find GHC/List_split -na

Re: Fail to compile ghc-6.2 on a Sun/Sparc

2004-01-15 Thread Volker Stolz
In local.glasgow-haskell-users, you wrote: > Ok, that was definitely my fault. I´ve built the gnu-make and tried again. > After an hour of compilation ghc ended with: > ./../ghc/utils/hsc2hs/hsc2hs-inplace -Iinclude -I../../ghc/includes -I. > GHC/Unicode.hsc > Unicode.hsc: In function `main':