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]
|
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
|
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 -
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
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'
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
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
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
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:
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 |
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
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
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
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
(Apologies for multiple postings)
IFL 2002
14th International Workshop on the
IMPLEMENTATION OF FUNCTIONAL LANGUAGES
Madrid
Spain
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
| 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
|
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
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
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 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
[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
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.
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
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.
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
(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
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 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
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'
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]
* 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 -
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
33 matches
Mail list logo