`span' vs `partition'. Reply

2000-05-30 Thread S.D.Mechveliani
Michael Marte <[EMAIL PROTECTED]> writes on 30 May 2000 > Standard module List defines: > [..] > groupBy :: (a -> a -> Bool) -> [a] -> [[a]] > groupBy eq []= [] > groupBy eq (x:xs)= (x:ys) : groupBy eq zs > where (ys,zs) = span (eq x)

Re: unsafeinterleaveIO

2000-05-30 Thread Manuel M. T. Chakravarty
Lennart Augustsson <[EMAIL PROTECTED]> wrote, > "Ronald J. Legere" wrote: > > > Thanks that explaination was very very helpfull! (Also Martins comments). > > One thing that I would like to understand is why so many of these > > nonstandard extensions get used all the time. It is very hard to >

Re: unsafeinterleaveIO

2000-05-30 Thread Fergus Henderson
On 30-May-2000, George Russell <[EMAIL PROTECTED]> wrote: > Fergus Henderson wrote: > > (If nothing at all can be guaranteed, then no-one should be using those > > features, and they should be removed from the Hugs/ghc extension libraries. > > But it should be possible to make some guarantees.) >

Re: unsafeinterleaveIO

2000-05-30 Thread Marcin 'Qrczak' Kowalczyk
Tue, 30 May 2000 18:52:53 +0200, Lennart Augustsson <[EMAIL PROTECTED]> pisze: > I feel quite strongly about this, and when I write Haskell programs > I try to avoid non-standard features as much as I can. Very often > you can; it might be a little inconvenient, but I think it's worth > the pric

Re: unsafeinterleaveIO

2000-05-30 Thread George Russell
Fergus Henderson wrote: > (If nothing at all can be guaranteed, then no-one should be using those > features, and they should be removed from the Hugs/ghc extension libraries. > But it should be possible to make some guarantees.) What on earth is a guarantee? GHC is a research project. I don't e

Re: unsafeinterleaveIO

2000-05-30 Thread Fergus Henderson
On 30-May-2000, George Russell <[EMAIL PROTECTED]> wrote: > "Ronald J. Legere" wrote: > > > > SUMMARY: How about a supplement to the standard that contains the > > 'standard' extensions that everyone uses. > One problem I have with this is that "unsafe" operations, being unsafe, > are difficult

List.group generalized

2000-05-30 Thread Michael Marte
Standard module List defines: -- group splits its list argument into a list of lists of equal, adjacent -- elements. e.g., -- group "Mississippi" == ["M","i","ss","i","ss","i","pp","i"] group :: (Eq a) => [a] -> [[a]] group= groupBy (==) groupBy

Re: unsafeinterleaveIO

2000-05-30 Thread George Russell
"Ronald J. Legere" wrote: > > SUMMARY: How about a supplement to the standard that contains the > 'standard' extensions that everyone uses. One problem I have with this is that "unsafe" operations, being unsafe, are difficult to fit in with the rest of the language. For example a common use of

Re: unsafeinterleaveIO

2000-05-30 Thread Lennart Augustsson
"Ronald J. Legere" wrote: > Thanks that explaination was very very helpfull! (Also Martins comments). > One thing that I would like to understand is why so many of these > nonstandard extensions get used all the time. It is very hard to > find any application package that doesnt use some nonstan

Re: unsafeinterleaveIO

2000-05-30 Thread Ronald J. Legere
SUMMARY: How about a supplement to the standard that contains the 'standard' extensions that everyone uses. Thanks that explaination was very very helpfull! (Also Martins comments). One thing that I would like to understand is why so many of these nonstandard extensions get used all the time.

3 Ph.D. Studentships at Leicester, U.K.

2000-05-30 Thread Simon Ambler
Please could you bring the following advert for postgraduate funding to the attention of any of your students who may be interested. Regards, Simon Ambler --- University of Leicester, U.K. Departm

3 Lectureships in Computer Science

2000-05-30 Thread Simon Ambler
I hope that the following positions may be of interest to someone on the Haskell mailing list. Regards, Simon Ambler --- UNIVERSITY OF LEICESTER DEPARTMENT OF MATHEMATICS & COMPUTER SCIENCE Lecturer A in Computer Science (3

FST TCS 2000: One week extension on the submission deadline

2000-05-30 Thread Sanjiva Prasad
Anticipating down time at our site, and to give interested authors the benefit of a weekend, we are extending the deadline for submission to June 6, 2000. We also encourange authors to submit using the START program that can be accessed from the home page of the FST TCS 2000 conference http

re-preluding

2000-05-30 Thread S.D.Mechveliani
Hello, all, It is again on re-preluding. MyPrelude aims to hide Ord(..), Bounded(..), Num(..), Integral(..), Fractional(..), subtract, fromIntegral, even, odd, gcd, lcm, (^), (^^) of Prelude and to re-define Ord, (+),(*),(^), even, odd, gcd, lcm The attempt ofmodule MyPrelude (.

Re: unsafeinterleaveIO

2000-05-30 Thread Marcin 'Qrczak' Kowalczyk
Tue, 30 May 2000 00:11:05 -0700 (PDT), Ronald J. Legere <[EMAIL PROTECTED]> pisze: > Ok, I have a question with regards to IO function that return things > of type IO [a], but where we are supposed to understand that the > list is returned in a lazy way. This sounds perfectly ok, It is not ok. N

Re: unsafeinterleaveIO

2000-05-30 Thread Koen Claessen
Ronald J. Legere wrote: | getContents :: Handle -> IO String | getContents h = | do x <- hGetChar h | xs <- getContents h | return (x:xs) : | Well, I mean this would work, but it would not do it | lazily. How can I make it do it lazily? As you found out, you can use

unsafeinterleaveIO

2000-05-30 Thread Ronald J. Legere
Ok, I have a question with regards to IO function that return things of type IO [a], but where we are supposed to understand that the list is returned in a lazy way. This sounds perfectly ok, but I started thinking about it and cant see how it can work. For example, if I wanted to make my own g