RE: bug in ghc, hugs, or green-card

2000-06-01 Thread Simon Marlow
So, the question is, "Should readFile on a directory throw an IO error?" If so, then there is a bug in Hugs; if not, there is a bug (or at least a severe misfeature) in Green Card (and a bug in the ghc libraries, which do throw an IO error). I rather think that openning a directory fail,

mkdependHS (proposal for improvement)

2000-06-01 Thread Marc van Dongen
Hi there, I don't know if this is a known problem. The ``problem'' with mkdependHS is when it is used in conjunction with happy. The imports in the .ly file are not recognised and one has to rebuild sources by hand. I am surprised I never noticed this before and it isn't a big problem. Just a

Re: mkdependHS (again)

2000-06-01 Thread Marcin 'Qrczak' Kowalczyk
Thu, 1 Jun 2000 16:20:24 +0100, Marc van Dongen [EMAIL PROTECTED] pisze: Please ignore my previous email. When used properly mkdependHS *does* indeed recognise dependencies in happy input files. But of course it does not recognize dependencies on output files from happy when they were not

Building 4.06 with 4.05 on WinNT..

2000-06-01 Thread Andy Gill
I'm trying to build 4.06 (to allow me to compile 4.07) with the install shield version of 4.05, on WinNT. It crashes with the message: rm -f PrelBase.o ; if [ ! -d PrelBase ]; then mkdir PrelBase; else find PrelBase -name '*.o' -print | xargs rm -f __rm_food ; fi ; ../../driver/ghc-inplace

mode argument

2000-06-01 Thread S.D.Mechveliani
To my suggestion on the mode argument for some standard functions quotRem ... divRem ... And we can hardly invent the mode type better than Char, because any specially introduced mode types bring the long names. quotRem 'n' x (-3) looks better than the pair quotRem divMod, and

Re: mode argument

2000-06-01 Thread Fergus Henderson
On 01-Jun-2000, S.D.Mechveliani [EMAIL PROTECTED] wrote: Why people do not complain on the mode argument outside of Haskell: `zip -r ...' `unzip -t xxx.zip' `tar xvfz xxx.tar.gz' ? People do indeed complain about Unix's habit of using cryptic option sequences like `-r', `-t' or

mode in functions

2000-06-01 Thread S.D.Mechveliani
Fergus Henderson [EMAIL PROTECTED] writes on 1 Jun 2000 'n' :: Char does not hold a name in the constructor name space. Yes, but it is also far from self-expanatory. With a constructor name, in a suitable environment you could just click on the constructor name and the environment would

Re: mode in functions

2000-06-01 Thread Jan Skibinski
On Thu, 1 Jun 2000, S.D.Mechveliani wrote: About the type constructor for mode, I half-agree. But about a single function - no. If you require the single functions sort_merge, sort_insert, sort_quick, do you also require tar_x, tar_xv, tar_v

Re: mode argument

2000-06-01 Thread D. Tweed
I knew of the namespace collision effect. But one has to choose between the bad and worse. And in any case, there remain too many ways to error. We also may paste True :: Bool instead of False (the type design does not help),

Re: mode for standard functions

2000-06-01 Thread Lennart Augustsson
Matt Harden wrote: "S.D.Mechveliani" wrote: More example on standard functions needing the *mode*: in quotRem, quot, rem, divMod, div, mod. ... blather about adding a "Char" argument to

mode for functions

2000-06-01 Thread S.D.Mechveliani
D. Tweed [EMAIL PROTECTED] writes on 1 Jun 2000 We also may paste True :: Bool instead of False (the type design does not help), x / 0 instead of x / 2, take n xs

Re: mode for functions

2000-06-01 Thread Lennart Augustsson
"S.D.Mechveliani" wrote: D. Tweed [EMAIL PROTECTED] writes on 1 Jun 2000 We also may paste True :: Bool instead of False (the type design does not help), x / 0 instead of x / 2,

Re: mode argument

2000-06-01 Thread Marcin 'Qrczak' Kowalczyk
On Thu, 1 Jun 2000, Fergus Henderson wrote: Again, `Positive' would not do, it should be something like QuotRem_Positive, and so on. This is a problem with Haskell, IMHO. There is no big problem with overloading: they can be variables instead of constructors. Look at TclHaskell, it has

Re: mode argument

2000-06-01 Thread Lennart Augustsson
Marcin 'Qrczak' Kowalczyk wrote: Of course I still think that div and sort should not have any form of mode argument. Agreed! -- -- Lennart

Re: unsafeinterleaveIO

2000-06-01 Thread Antti-Juhani Kaijanaho
On Thu, Jun 01, 2000 at 03:34:10PM +1000, Manuel M. T. Chakravarty wrote: Antti-Juhani Kaijanaho [EMAIL PROTECTED] wrote, On Wed, May 31, 2000 at 12:06:00PM +1000, Manuel M. T. Chakravarty wrote: The one hole I am most concerned about is access to standard OS services and code written

negate and sections

2000-06-01 Thread Jeffrey R. Lewis
I just ran into this lovely little corner today, and wondering if anyone has any nice suggestions for fixing it. You can write the section (+ x) to specify a function to add `x' to something. That's great, then you need to specify a function for subtracting `x' from something. Great, you just

Re: negate and sections

2000-06-01 Thread Jan Skibinski
On Thu, 1 Jun 2000, Jeffrey R. Lewis wrote: No so, of course. (- x) means `negate x'. Bummer. What an unpleasant bit of asymmetry! How about ((-) x) ? Jan

Re: unsafeinterleaveIO

2000-06-01 Thread Fergus Henderson
On 01-Jun-2000, Antti-Juhani Kaijanaho [EMAIL PROTECTED] wrote: Like there is no way in Haskell 98 to access OS services beyond a certain subset, there is no way in C90 or C99 to access OS services beyond a certain subset. Haskell's subset is actually larger than C's. Like Haskell, C has

Re: negate and sections

2000-06-01 Thread Jeffrey R. Lewis
Jan Skibinski wrote: On Thu, 1 Jun 2000, Jeffrey R. Lewis wrote: No so, of course. (- x) means `negate x'. Bummer. What an unpleasant bit of asymmetry! How about ((-) x) ? That, regrettably, is the wrong function. That function is \y - x - y. I wanted \y - y - x. --Jeff

Re: negate and sections

2000-06-01 Thread Zhanyong Wan
"Jeffrey R. Lewis" wrote: Jan Skibinski wrote: On Thu, 1 Jun 2000, Jeffrey R. Lewis wrote: No so, of course. (- x) means `negate x'. Bummer. What an unpleasant bit of asymmetry! How about ((-) x) ? That, regrettably, is the wrong function. That function is \y - x -

RE: negate and sections

2000-06-01 Thread Mark P Jones
Hi Jeff, | You can write the section (+ x) to specify a function to add `x' to | something. That's great, then you need to specify a function for | subtracting `x' from something. This is why the "subtract" function is included in the Prelude: Prelude map (subtract 1) [1..10]

Re: negate and sections

2000-06-01 Thread Robert Jeschofnik
On 01-Jun-2000, Jeffrey R. Lewis [EMAIL PROTECTED] wrote: You can write the section (+ x) to specify a function to add `x' to something. That's great, then you need to specify a function for subtracting `x' from something. Great, you just type in: (- x), and you're done, right? No so,

Re: negate and sections

2000-06-01 Thread Rob MacAulay
Date sent: Thu, 01 Jun 2000 08:47:23 -0700 From: "Jeffrey R. Lewis" [EMAIL PROTECTED] Organization: Galois Connections To: Jan Skibinski [EMAIL PROTECTED] Copies to: [EMAIL PROTECTED] Subject:Re: negate and

Re: negate and sections

2000-06-01 Thread Jeffrey R. Lewis
Zhanyong Wan wrote: "Jeffrey R. Lewis" wrote: Jan Skibinski wrote: On Thu, 1 Jun 2000, Jeffrey R. Lewis wrote: No so, of course. (- x) means `negate x'. Bummer. What an unpleasant bit of asymmetry! How about ((-) x) ? That, regrettably, is the wrong

Re: mode argument

2000-06-01 Thread Ketil Malde
Fergus Henderson [EMAIL PROTECTED] writes: Again, `Positive' would not do, it should be something like QuotRem_Positive, and so on. This is a problem with Haskell, IMHO. Mercury allows overloading of constructor names, so in Mercury you could use just `Positive' rather than

Re: mode in functions

2000-06-01 Thread Ketil Malde
Jan Skibinski [EMAIL PROTECTED] writes: On Thu, 1 Jun 2000, S.D.Mechveliani wrote: If you require the single functions sort_merge, sort_insert, sort_quick, do you also require tar_x, tar_xv, tar_v instead of tar mode ? If tar was implemented

Re: mode in functions

2000-06-01 Thread D. Tweed
On 1 Jun 2000, Ketil Malde wrote: I could accept "mode flags" if the algorithm is extremely similar, e.g. passing a comparator function to a sort is a kind of mode flag (think ordered/reversed) which I think is perfectly acceptable. Having flags indicating algorithm to use (sort Merge

Re: mode in functions

2000-06-01 Thread Jan Skibinski
On 1 Jun 2000, Ketil Malde wrote: Jan Skibinski [EMAIL PROTECTED] writes: For tar_x, tar_xv, tar_v kind of things people invented objects, recognizing that "tar -x" approach is not a user friendly technology. Oh? You realize there are Unix weenies on this list, don't

Re: mode in functions

2000-06-01 Thread Simon Raahauge DeSantis
On Thu, Jun 01, 2000 at 07:23:55PM +0200, Ketil Malde wrote: Jan Skibinski [EMAIL PROTECTED] writes: On Thu, 1 Jun 2000, S.D.Mechveliani wrote: If you require the single functions sort_merge, sort_insert, sort_quick, do you also require

Re: mode in functions

2000-06-01 Thread Jan Skibinski
I watch in amusement how my name is glued to someone else's prose. I mildly protest :-) Jan

Re: mode in functions

2000-06-01 Thread Carl R. Witty
Simon Raahauge DeSantis [EMAIL PROTECTED] writes: It seems to me that mode flags only really make sense when we're combining modes. To continue the tar example it might be a bit much to have extractVerbosePreserve, extractPreserve etc etc. This is also done in C by |'ing 'flags' together for

types: checking vs. inferring

2000-06-01 Thread Levent Erkok
Hi, I've come accross an interesting bit of code: class X a where u :: a b - a b f :: X a = b - a b f = f g :: X a = a b - b g = g -- h :: X a = b - a c h b = f (g (h b))

Re: mode in functions

2000-06-01 Thread Simon Raahauge DeSantis
On Thu, Jun 01, 2000 at 04:06:59PM -0400, Jan Skibinski wrote: I watch in amusement how my name is glued to someone else's prose. I mildly protest :-) Jan Sorry about that. If you pay close attention to the quoting levels (as I obviously did not) there's no actual

mode in functions

2000-06-01 Thread S.D.Mechveliani
Ketil Malde [EMAIL PROTECTED] writes I could accept "mode flags" if the algorithm is extremely similar, e.g. passing a comparator function to a sort is a kind of mode flag (think ordered/reversed) which I think is perfectly acceptable. Having flags indicating algorithm to use (sort Merge