Re: Haskell Clean

2000-01-25 Thread Jerzy Karczmarczuk
Simon Marlow: Strictly speaking, you can't "evaluate" a value of type (IO a) and have it perform some I/O operations. In fact, there's no way to perform an IO computation in Haskell other than binding it to a value called 'Main.main', compiling and running it. (*) Pablo E. Martinez

RE: Haskell Clean

2000-01-25 Thread Simon Marlow
Well, I see what you mean, no way, NO means, etc. So, the program below in Hugs would not work as it should? Too bad... -- === -- ioio.hs dump f = readFile f = putStr gimmeThat = dump "ioio.hs" -- === Well, pedantically speaking

RE: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Simon Peyton-Jones
| Why not do what python does? Thanks for an interesting suggestion, Alex! However, we are in typo-fixing mode here. In the interests of helping this discussion converge I'm going to exercise my dictatorial powers. Though Alex's suggestion has its attractions, I judge it too big a change to

Main reasoning

2000-01-25 Thread Jerzy Karczmarczuk
I permitted myself to protest (veeery mildly) against some very strict statements concerning a non-strict language, of S. Marlow and P.E. Martinez Lopez: In fact, there's no way to perform an IO computation in Haskell other than binding it to a value called 'Main.main', compiling and

Relection

2000-01-25 Thread Chris Angus
I posted this to comp.lang.functional a while ago but (apparently) no one had an opinion which I cant believe is the case :-) Chris I would be interested to know people's views on adding reflection to Haskell to get Factory-like behaviour. I was thinking that other modules could "export"

RE: Relection

2000-01-25 Thread Chris Angus
By reflection I mean the sort of thing Java does in java.lang.reflect i.e. given the name/type of a function we can retrieve that function and subsequently use it in the same way that in java given the name of a class we can create instances of that class. i.e. it is quite common to have

Re: Deprecated features

2000-01-25 Thread George Russell
Sven Panne wrote: Just a thought: Some compilers for other languages (e.g. Java and Eiffel) warn the user about deprecated features, but continue compilation. Given the current state of flux in the Haskell libraries, this would be a nice thing in Haskell, too. So my suggestion is a new

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Tommy Thorn
Chris Okasaki wrote: For the people that share this sentiment, can you please explain why ints that are too big should not similarly give an error? I can see both being ok, or both being errors. I just don't see why one should be ok and the other an error. IMHO, both should be errors.

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread D. Tweed
On Tue, 25 Jan 2000, Chris Okasaki wrote: I'm with the option (B): negatives are just outside the domain of takedrop, and should give you an error message. For the people that share this sentiment, can you please explain why ints that are too big should not similarly give an error?

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread D. Tweed
On Tue, 25 Jan 2000, D. Tweed wrote: Oops, fixing two thinko's f _ [] = [] f a xs =res:f a' zs (ys,zs)=splitAt 40 xs (a',res)=doStuff a ys (My haskell coding is getting worse than my C++, which I didn't believe possible...)

Re: Reflection (was: Relection)

2000-01-25 Thread Koen Claessen
Chris Angus wrote: | and values could be requested from it a la... | | lookup :: a - Name - Maybe a | | Where the initial "a" is needed to make it all typesafe I don't understand why this extra argument is needed. | Reflect.lookup (bot::String - IO Image) (makeFnName name) If it is

RE: Relection

2000-01-25 Thread jwit
Hello everybody, The concept of reflection can also be taken further than Chris' idea, which is fairly useful in it's own right, but could possibly be achieved by some smart FFI-wizard (not sure, this idea just popped into my head). What I'm getting at is some kind of way to get your hands on

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Joe Fasel
Phil Wadler writes: | I'm with Jon Fairbairn on this. Negative arguments are an error | because the domain of take and drop is the naturals. The problem | is that we use Int to represent naturals. -- P | | For the people that share this sentiment, can you please | explain why ints that are

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Chris Okasaki
I'm with Jon Fairbairn on this. Negative arguments are an error because the domain of take and drop is the naturals. The problem is that we use Int to represent naturals. -- P Yep, this is exactly the same argument we had about this a year or two ago, Phil. My attitude about the "implicit

Re: Relection

2000-01-25 Thread George Russell
Chris Angus wrote: Put simply What do people think about being able to access functions from other modules without importing the module. i.e. Rather than ---Start- import Foo -- call f callFoof x = f x --End We can do

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Philip Wadler
Chris, I admit your argument about symmetry is attractive. If you could put forward a concrete application, on a par with the `break into blocks' application given earlier, you would likely sway me. -- P

Re: Haskell 98: partition; and take,drop,splitAt

2000-01-25 Thread Jan-Willem Maessen
As an implementor of eager haskell, I sometimes think it would be nice if all list functions checked the length of their argument, thus stamping out infinite lists forever! In al seriousness, the prelude functions should support a lazy programming style as far as is possible. I found the "split

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Joe Fasel
Chris Okasaki writes: | But if the type *says* Int, then it should have reasonable behavior | for ints. I look at the negative case as being equivalent to | standard mathematical treatment of ranges such as i..j, where the | range is considered to be empty if j i. Allowing take/drop to |

Re: fixing typos in Haskell-98

2000-01-25 Thread George Russell
(sorry, can't remember the original author) | The correct definitions would be: | | take -2 -- drops the last 2 elements from the list | (takes everything except the last 2 elements) | drop -2 -- grabs the last 2 elements from the list | (drops everything except

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Marcin 'Qrczak' Kowalczyk
Tue, 25 Jan 2000 12:14:29 -0500 (EST), Chris Okasaki [EMAIL PROTECTED] pisze: I would have no arguments with either approach, or with any other approach that makes Nat explicit in the type. But if the type *says* Int, then it should have reasonable behavior for ints. I can't agree with

Re: Relection

2000-01-25 Thread Marcin 'Qrczak' Kowalczyk
Tue, 25 Jan 2000 18:12:32 +0100, jwit [EMAIL PROTECTED] pisze: What I'm getting at is some kind of way to get your hands on an abstract syntax representation of a Haskell expression/datatype/module, modifying it, re-typechecking it, and then transforming it back into a Haskell value. In

RE: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Brian Boutel
On Wednesday, January 26, 2000 9:12 AM, Joe Fasel [SMTP:[EMAIL PROTECTED]] wrote: The call some have made for the tightest possible error checking also has merit, however. That would suggest these definitions: takeExactly 0 _ = [] takeExactly (n+1) (x:xs) = x : takeExactly n xs

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Tom Pledger
Hi. For H98, I prefer option (A). Option (B) gives an arbitrary dissimilarity with rangeSize and enumFromTo. They currently match the standard mathematical treatment of ranges such as i..j, which Chris Okasaki mentioned. I'm not saying that they're sacred, just that a shift to the style of

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Craig Dickson
Brian Boutel [EMAIL PROTECTED] wrote: We have seen various proposals about what laws should hold wrt take and drop. I think there is a reasonable presumption that the following very simple laws should hold first: length (take n xs) === n length (drop n xs) === length xs -n Does that not

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Craig Dickson
Tom Pledger [EMAIL PROTECTED] wrote: Craig Dickson writes: [...] I don't want a pattern like "(x:xs)" to match the empty list, which it presumably would if "head []" and "tail []" did not fail (x and xs would both be bound to []). I don't think it would. Patterns involve data

Re: Relection

2000-01-25 Thread Fergus Henderson
On 25-Jan-2000, Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] wrote: Tue, 25 Jan 2000 18:12:32 +0100, jwit [EMAIL PROTECTED] pisze: What I'm getting at is some kind of way to get your hands on an abstract syntax representation of a Haskell expression/datatype/module, modifying it,

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Matt Harden
Chris Okasaki wrote: I'm with the option (B): negatives are just outside the domain of takedrop, and should give you an error message. For the people that share this sentiment, can you please explain why ints that are too big should not similarly give an error? I can see both being

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Fergus Henderson
On 25-Jan-2000, Craig Dickson [EMAIL PROTECTED] wrote: Brian Boutel [EMAIL PROTECTED] wrote: We have seen various proposals about what laws should hold wrt take and drop. I think there is a reasonable presumption that the following very simple laws should hold first: length (take n

A hard core game programmers view

2000-01-25 Thread Lennart Augustsson
Take a look at what a hard core game programmer thinks about the evolution of programming languages. Unreal is a very sucessful game so maybe people listen to him... http://www.gamespy.com/articles/devweek_b.shtm You need to read until about page 5 to get to the part I enjoyed most. --

Re: Relection

2000-01-25 Thread S. Alexander Jacobson
This discussion feels like deja-vu all over again! What is wrong with the various generic programming extensions that have already been discussed? Derive, PolyP and their progeny? -Alex- ___ S. Alexander Jacobson

Re: Relection

2000-01-25 Thread Fergus Henderson
On 25-Jan-2000, S. Alexander Jacobson [EMAIL PROTECTED] wrote: This discussion feels like deja-vu all over again! What is wrong with the various generic programming extensions that have already been discussed? Derive, PolyP and their progeny? I don't think there's anything fundamentally wrong

Re: drop take [was: fixing typos in Haskell-98]

2000-01-25 Thread Fergus Henderson
On 26-Jan-2000, Brian Boutel [EMAIL PROTECTED] wrote: On Wednesday, January 26, 2000 1:52 PM, Fergus Henderson [SMTP:[EMAIL PROTECTED]] wrote: I agree that it is too big a change for Haskell 98. But I think it would be too big a change for Haskell 2000 too. Making a change like that

Re: Haskell Clean

2000-01-25 Thread Anton Moscal
On Fri, 14 Jan 2000, Arjan van IJzendoorn wrote: So what are the important differences between Clean Haskell? Input and output in Haskell is done through the use of monads. In Clean uniqueness typing is used. Unique (=linear?) types designed for the modelling of the mutable states.

DocBook tools versionitis?

2000-01-25 Thread Sven Panne
Last night's build from CVS failed because of the docs: [...] + cd docs + make dvi ps html db2dvi -d /usr/src/packages/BUILD/fptools/docs/fptools-both.dsl installing.sgml tex output file name is jade:/var/lib/sgml/CATALOG.docbk31:24:0:W: DTDDECL catalog entries are not

Re: DocBook tools versionitis?

2000-01-25 Thread Michael Weber
On Tue, Jan 25, 2000 at 10:33:30 +0100, Sven Panne wrote: Last night's build from CVS failed because of the docs: [...] The `-d' option seems strange: panne@marutea:/usr/src/packages/SOURCES/fptools db2dvi --version db2dvi - docbook-tools 0.5

Re: DocBook tools versionitis?

2000-01-25 Thread Sven Panne
Michael Weber wrote: [...] IIRC, Sven's version is SuSE home-brewed (and incompatible, of course) [...] I've just realized the same, and immediately sent a bug report to SuSE. :-( Cheers, Sven -- Sven PanneTel.: +49/89/2178-2235 LMU, Institut fuer

RE: cannot download ghc-pre-4.06

2000-01-25 Thread Simon Marlow
I wanted to test ghc-pre-4.06 and had made three attempts per week to download http://research.microsoft.com/~simonmar/ghc/snapshot/ ghc-pre-4.06-2117-src.tar.gz FYI, pre-release snapshots are now available as

Re: cannot download ghc-pre-4.06

2000-01-25 Thread Dr. Mark E. Hall
Simon Marlow wrote: via netscape program. After 1-2 hours it gets about 50% of the file and than somewhat breaks, gets out of downloading to the main menu. There is much of the free space on the disk. Earlier, when ghc-4.04 appeared, I downloaded it successfully by the same