RE: bad check for Defined but not used

2002-05-16 Thread Simon Peyton-Jones
GHC's notion of unused is broken in ways that are not trivial to fix. It's been on my wish list for ages...but it's not a very exciting problem to tackle. Simon | -Original Message- | From: Feliks Kluzniak [mailto:[EMAIL PROTECTED]] | Sent: 15 May 2002 19:31 | To: [EMAIL PROTECTED] |

RE: efficiency of UArray

2002-05-16 Thread Simon Peyton-Jones
GHC doesn't remove intermediate lists down both branches of a zip, so yes, you'll get intermediate lists. Why not use array indexing, as per your second version (only in Haskell)? Simon | -Original Message- | From: Hal Daume III [mailto:[EMAIL PROTECTED]] | Sent: 16 May 2002 00:55 |

Exceptions and IO

2002-05-16 Thread Ashley Yakeley
My confusion surrounding exceptions in the IO monad comes from the fact that IO failures and bottom are not cleanly separated. I had always assumed the IO monad looked something like this: newtype IO a = IO (RealWorldState - Either IOFailure (RealWorldState,a)) return a = IO (\r -

Re: Giving profiled object files a different extension (was: RE: Profiling suggestion)

2002-05-16 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: Re the current and recurring conflicts between profiling and non-profiling code; how hard would it be to name GHC's output files differently when compiling with -prof? The proposal, therefore, is to extend the meaning of '-prof' to mean '-prof

syntax of RULES pragmas?

2002-05-16 Thread Janis Voigtlaender
Hi, I was trying to play with GHC 5.02's RULES pragmas, but failed due to syntax problems. When trying: {-# RULES map/map forall f g xs. map f (map g xs) = map (f.g) xs #-} main = print (map id (map id Hello)) I get: ghc5 test.hs -O test.hs:1: Variable not in scope: `forall'

RE: syntax of RULES pragmas?

2002-05-16 Thread Simon Peyton-Jones
You need -fglasgow-exts. (Should ignore a pragma without -fglasgow-exts, and does so now, but 5.03 gave the bad message you found.) The manual is wrong; spaces between the variables is right. Simon | -Original Message- | From: Janis Voigtlaender [mailto:[EMAIL PROTECTED]] | Sent: 16

RE: infix type constructors

2002-05-16 Thread Simon Peyton-Jones
Chris I'm slowly getting around to this. Design questions: (A) I think it would be a good compromise to declare that operators like + are type *constructors* not type *variables*. So S+T would be a type. That's slightly inconsistent with value variables, but it's jolly useful. So

?? Redirecting standar error output ...

2002-05-16 Thread heron_carvalho
Hello, How can I redirect standard error output to a file in GHC 5.02 ?? Something like -odump flag in GHC 4.08 ... Best Regards, Heron de Carvalho __ Quer ter seu próprio endereço na Internet? Garanta já o seu e

?? Redirecting standar error output ...

2002-05-16 Thread Heron
Hello, How can I redirect standard error output to a file in GHC 5.02 ?? Something like -odump flag in GHC 4.08 ... Best Regards, Heron de Carvalho __Heron CarvalhoMSc.ICQ#:117117637 Current ICQ status:

RE: efficiency of UArray

2002-05-16 Thread Hal Daume III
GHC doesn't remove intermediate lists down both branches of a zip, so yes, you'll get intermediate lists. Okay. Why not use array indexing, as per your second version (only in Haskell)? something along the lines of: f arr = f' low 0 where (low,high) = bounds arr f' pos acc |

Re: State monads don't respect the monad laws in Haskell

2002-05-16 Thread Janis Voigtlaender
John Launchbury wrote: I watched with interest the discussion about the ravages of `seq`. In the old days, we protected uses of `seq` with a type class, to keep it at bay. There was no function instance (so no problem with the state monads, or lifting of functions in general), and the

Re: Functional design patterns (was: How to get functional software engineering experience?)

2002-05-16 Thread Kellom{ki Pertti
On Wed, May 15, 2002 at 08:13:22PM +0200, [EMAIL PROTECTED] wrote: Yet another problem is that design patterns are all about design and less about coding. Many challenges in functional programming are about coding, and just about coding. This is something I've chatted about with a colleague

Re: What does FP do well? (was How to get functional software engineering experience?)

2002-05-16 Thread D. Tweed
On Wed, 15 May 2002, Hal Daume III wrote: I tend to agree. I keep meaning for experimental purposes to define a list type called AList or something which is syntactically identical to lists (i.e., you can use the familiar (:) and [] operators/sugar), but gets preprocessed out as actually

Re: preprocessing printf/regex strings (like ocaml)

2002-05-16 Thread Robert Ennals
Robert Ennals [EMAIL PROTECTED] wrote: Surely that problem only arises if one insists on encoding all the relevant information inside a string. This is pretty much the only option, because translators and programmers are different people. Translators can deal with simple text files

Second IFL 2002 announcement

2002-05-16 Thread Ricardo Pe~na
(Apologies for multiple postings) IFL 2002 14th International Workshop on the IMPLEMENTATION OF FUNCTIONAL LANGUAGES Madrid Spain

Re: preprocessing printf/regex strings (like ocaml)

2002-05-16 Thread Martin Norbäck
tor 2002-05-16 klockan 10.50 skrev Robert Ennals: I don't really see what makes a string such as I have %. %. %.. [where the user has to work out what the substrings are] any harder to deal with than I have ++ action ++ ++ number ++ ++ whatas other from the fact that the

RE: Dependent Types

2002-05-16 Thread Simon Peyton-Jones
| Here's a bit of background I managed to dig up: | http://www.mail-archive.com/haskell@haskell.org/msg05160.html | It appears that a change to the monomorphism | restriction to match Hugs's behaviour was considered for | Haskell 98, but it looks like it never made it into the report |

Re: What does FP do well? (was How to get functional software engineering experience?)

2002-05-16 Thread Bjorn Lisper
Karl-Filip: But what I really meant is, if I may rephrase it, that imperative programs might often be both faster and harder to write because they embed more information about the abblication domain. That is, if you code in C and want an array, you must specify its size, so you have to think

Re: Dependent Types

2002-05-16 Thread Jon Fairbairn
Dominic Steinitz [EMAIL PROTECTED] wrote: I've managed to crack something that always annoyed me when I used to do network programming. [. . .] Suppose I want to send an ICMP packet. The first byte is the type and the second byte is the code. Furthermore, the code depends on the type. Now

Re: State monads don't respect the monad laws in Haskell

2002-05-16 Thread John Launchbury
Yes. Let me be clear. It is not the fact that `seq` operates on functions that breaks foldr/build: it is the fact that `seq` claims to be parametrically polymorphic when in fact it is not. The parametricity result is weakened to the point that the foldr/build proof no longer applies, and a

Your message to Hugs-Users awaits moderator approval

2002-05-16 Thread hugs-users-admin
Your mail to 'Hugs-Users' with the subject Meeting notice Is being held until the list moderator can review it for approval. The reason it is being held: Message body is too big: 126883 bytes but there's a limit of 40 KB Either the message will get posted to the list, or you will

Re: Functional design patterns (was: How to get functional software engineering experience?)

2002-05-16 Thread Joost Visser
[EMAIL PROTECTED] wrote: Joost Visser and I, we worked out a few maybe not so obvious functional programming patterns such as Success By Failure, Role Play, Rewrite Step, Keyhole Operation just to mention a few. By not so obvious I mean that they deal with generic programming rather than

Subject: Scheme Workshop 2002 -- submission deadline extended

2002-05-16 Thread Olin Shivers
The Scheme Workshop submission deadline has been extended two weeks. The new submission deadline is May 31 (2200 UTC). The 2002 Scheme Workshop will be in Pittsburgh in October, the day before ICFP. We will be planning not only presentation of papers but also some interesting group discussions.

Negative literals and the meaning of case -2 of -2 - True

2002-05-16 Thread Thomas Hallgren
Hi, The Haskell report seems pretty clear about the meaning of numeric literals and negation in expressions: -2 should be interpreted as negate (fromInteger 2). That is, negated literals are not treated specially, the general rule -(e) == negate (e) applies. (See section 3.2 and 3.4 of the

Re: infix type constructors

2002-05-16 Thread Andrew J Bromage
G'day all. On Thu, May 16, 2002 at 07:24:10AM -0700, Simon Peyton-Jones wrote: I'm slowly getting around to this. Design questions: (A) I think it would be a good compromise to declare that operators like + are type *constructors* not type *variables*. So S+T would be a type.

ASSIST ME

2002-05-16 Thread vincent yerima
CONFIDENTIAL BUSINESS PROPOSAL You may be suprise to receive this letter from me since you dont know me personally. The purpose of my introduction is that I am VINCENT YERIMA, the first son of DAVID YERIMA, the most popular farmer in Zimbabwe who was recently

RE: ASSIST ME

2002-05-16 Thread Konst Sushenko
(the original confidential business proposal removed) Hello, It was my impression that the list maintainers were considering making this list moderated, or open only to subscribers. Is there a decision on that? Thanks konst ___ Haskell mailing list

Re: ASSIST ME

2002-05-16 Thread John Peterson
The current plan is to filter via spews. We could go to member-only posting if that's what people want but it means that students asking their homework questions will have a harder time :-). Plus if the list is redistributed that's another problem. Our original spam filter was generating

Your message to Hugs-Users awaits moderator approval

2002-05-16 Thread hugs-users-admin
Your mail to 'Hugs-Users' with the subject Is being held until the list moderator can review it for approval. The reason it is being held: Message body is too big: 133787 bytes but there's a limit of 40 KB Either the message will get posted to the list, or you will receive

Simple Question

2002-05-16 Thread Jerry, JiJie
Hi, enlightenment much appreciated for my newbie question -- to achieve: append' [ [1, 2], [3, 4], [5] ] 6 - [ [1, 2], [3, 4], [5, 6] ] append' [ ['1', '2'], ['3'] ] '4' - [ ['1', '2'], ['3', '4'] ] append' [ [True], [True] ] False - [ [True], [True, False] ] so I (naively) write: 18) append'

Re: Simple Question

2002-05-16 Thread Ch. A. Herrmann
Hi, JiJie 20) append' x:xs y = [(init x:xs)] ++ [(tail xs)++[y]] function application (blank) binds stronger than :, thus you should write append' (x:xs) y = ... Cheers -- Christoph ___ Haskell-Cafe mailing list [EMAIL PROTECTED]

Simple Question Follow Up

2002-05-16 Thread Jerry, JiJie
* Ch. A. Herrmann [EMAIL PROTECTED] [020516 21:38]: Hi, JiJie 20) append' x:xs y = [(init x:xs)] ++ [(tail xs)++[y]] function application (blank) binds stronger than :, thus you should write append' (x:xs) y = ... -- so I added the parenthesis: 18) append' :: [[a]] - a -

Re: Simple Question Follow Up

2002-05-16 Thread Ch. A. Herrmann
To make it short: Main let append' xs y = init xs ++ [last xs ++ [y]] This works for the three given examples but maybe incorrect for the task you have in mind, e.g., if xs is empty. Main append' [ [1, 2], [3, 4], [5] ] 6 [[1,2],[3,4],[5,6]] Main append' [ ['1', '2'], ['3'] ] '4' [12,34] Main