tis 2002-05-14 klockan 06.37 skrev anatoli:
Brian Huffman [EMAIL PROTECTED] wrote:
Here is a printf-style function that I hacked up this morning; it uses type
classes but it doesn't need functional dependencies:
[snip]
It's very nice and even extendable, though `class Printf String'
is
On Tuesday, May 14, 2002, at 06:37 AM, anatoli wrote:
Brian Huffman [EMAIL PROTECTED] wrote:
Here is a printf-style function that I hacked up this morning; it uses
type
classes but it doesn't need functional dependencies:
[snip]
It's very nice and even extendable, though `class Printf
An interesting revelation just occurred to Simon P.J. and myself while
wondering about issues to do with exceptions in the IO monad (see
discussion on [EMAIL PROTECTED] if you're interested).
The question we were considering was whether the following should hold
in the IO monad:
(return
On Tue, May 14, 2002, Simon Marlow wrote:
An interesting revelation just occurred to Simon P.J. and myself while
wondering about issues to do with exceptions in the IO monad (see
discussion on [EMAIL PROTECTED] if you're interested).
The question we were considering was whether the
On Tue, May 14, 2002 at 12:14:02PM +0100, Simon Marlow wrote:
The question we were considering was whether the following should hold
in the IO monad:
(return () = \_ - undefined) `seq` 42 == undefined
[as implied by the left-identity monad law]
This discrepancy applies to any
MILLIONS of dollars in brand name high quality motorcycle
accessories featured on this months sites. Some products are being liquidated
at unbelievable blowout prices! Most products are being sold for significant
discounts off of retail pricing. In some cases prices have been slashed
up to 70%
Martin Norbäck [EMAIL PROTECTED] wrote:
I agree that i18n needs positional arguments.
What's wrong with simply doing like this:
printf I have %. %. %..[trained, show 1, Jedi]
printf %2. %3. %1. I have. [trained, show 1, Jedi]
Nothing is exceptionally wrong with it, except it's not
as
Martin Norbäck [EMAIL PROTECTED] wrote:
I agree that i18n needs positional arguments.
What's wrong with simply doing like this:
printf I have %. %. %..[trained, show 1, Jedi]
printf %2. %3. %1. I have. [trained, show 1, Jedi]
Nothing is exceptionally wrong with it, except it's
Simon Marlow wrote
[snip]
So the IO monad in Haskell, at least as we understand it, doesn't
satisfy the monad laws (or, depending on your point of view, seq breaks
the monad laws).
[snip]
Cheers Simon. One of the awkward things about the Haskell events I implemented
is that although I make
tis 2002-05-14 klockan 16.45 skrev Robert Ennals:
Martin Norbäck [EMAIL PROTECTED] wrote:
I agree that i18n needs positional arguments.
What's wrong with simply doing like this:
printf I have %. %. %..[trained, show 1, Jedi]
printf %2. %3. %1. I have. [trained, show 1, Jedi]
On Tue, May 14, 2002 at 03:45:36PM +0100, Robert Ennals wrote:
Just thought I would jump in and say that, unlike (it seems)
everyone else, I hate printf in C. It is a horrible horrible
inextensible hack of a function that I find extremely awkward to
use.
...
I personally much prefer the
On Tue, May 14, 2002 at 04:57:12PM +0200, George Russell wrote:
According to the report
Instances of Monad should satisfy the following laws:
return a = k = k
m = return= m
m = (\x - k x = h) = (m = k) = h
so neither IO nor my events satisfy this. Up to
Robert Ennals [EMAIL PROTECTED] wrote:
I personally much prefer the syntax currently used in Haskell, which is also
essentially what is used in most other recent languages, including Java, C++,
and (god help me) Perl.
In the example given, I could write:
I have ++ action ++ ++
Dylan Thurston wrote:
[snip]
I've often been bothered by the inconsistent treatment of laws in the
report; why are there laws for functors, monads, and quot/rem and
div/mod, and not much else? I'm pleased to see that the laws that are
given actually do have exceptions.
[snip]
Even the
Robert Ennals [EMAIL PROTECTED] wrote:
I personally much prefer the syntax currently used in Haskell, which is also
essentially what is used in most other recent languages, including Java, C++,
and (god help me) Perl.
In the example given, I could write:
I have ++ action ++
Dylan Thurston [EMAIL PROTECTED] writes:
I don't think this is necessarily wise to drop this from the report
altogether. To me, it seems comparable to associativity of addition
for instances of Num; many instances don't satisfy it (e.g., Float),
but it's a useful guideline to keep in mind.
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 with one
S.M.Kahrs wrote:
[snip]
I don't think this really solves the problem with the left unit
(not in general, and not for IO either),
it merely pushes it to a different place.
[snip]
Not being a category theorist I find this all a bit confusing. Can you
give an example where with GHC and the fix I
S.M.Kahrs wrote:
[snip]
I don't think this really solves the problem with the left unit
(not in general, and not for IO either),
it merely pushes it to a different place.
[snip]
Not being a category theorist I find this all a bit confusing.
Nothing to do with category theory.
I took
On 2002-05-14T12:32:30-0400, Jan-Willem Maessen wrote:
And I'd really much rather we cleaned up the semantics of
seq---or better yet, fixed the problems with lazy evaluation which
make seq necessary in the first place.
A general question: What is seq useful for, other than efficiency?
--
It's useful for:
debug :: Show a = a - a
debug x = unsafePerformIO (hPutStrLn stderr (show x)) `seq` x
(Presumably trace is defined similarly)
One may ask the question: what is seq useful for not in conjunction with
unsafePerformIO, other than efficiency. That, I don't know the answer to.
-
One may ask the question: what is seq useful for not in conjunction with
unsafePerformIO, other than efficiency. That, I don't know the answer to.
Here is an example.
main::IO()
main=do
time1 - getCPUTime
w - return $! calcSomething
time2 - getCPUTime
...
J.A.
Hello all,
I've got a not-quite-so-technically-detailed question for everyone.
For the past ten or so years, I've been building relatively large real-world
software systems, and I've always been interested in finding new and
innovative ways to reduce complexity and improve system
hello,
this is misleading. seq only evaluates to whnf, i.e.
the outermost lazy constructor (or lambda) and that only if the
seq ... expression is actually evaluated, which is often tricky to
ensure. furthermore, for non-functions one can get the same behaviour,
by using a case with a pattern.
True, but using seq you can define deepSeq/rnf (depening on which camp
you're from), which isn't misleading in this way.
--
Hal Daume III
Computer science is no more about computers| [EMAIL PROTECTED]
than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume
On Tue, 14 May
Hal Daume [EMAIL PROTECTED] writes:
[seq is] useful for:
debug :: Show a = a - a
debug x = unsafePerformIO (hPutStrLn stderr (show x)) `seq` x
(Presumably trace is defined similarly)
One may ask the question: what is seq useful for not in conjunction with
unsafePerformIO, other than
G'day all.
On Tue, May 14, 2002 at 04:47:13PM -0500, Jeffrey Palmer wrote:
Are there any options for people like me, or does my functional experience
remain limited to the hobby* work I can squeeze in at night and on weekends?
Thoughts?
The first thing you have to understand is that
REQUEST FOR URGENT BUSINESS ASSISTANCE
--
I stumbled into your contact by stroke of luck after a
long search for an honest and trust worthy person who
could handle issue with high confidentiality.
I was so dilghted when i got your contact and i decided
to
However, it appears that the only place (short of Ericsson) I can actually
work on a complex functional system is in academia. Unfortunately, this is
not an option, as I have no Ph.D., and going back to school is probably not
realistic.
There are other companies using Erlang, if not on as
On Tue, 14 May 2002, Ken Shan wrote:
On 2002-05-14T12:32:30-0400, Jan-Willem Maessen wrote:
And I'd really much rather we cleaned up the semantics of
seq---or better yet, fixed the problems with lazy evaluation which
make seq necessary in the first place.
A general question: What is
Title: Message
maybe
you need to rebuild the compiler you are compiling *with*?
-Original Message-From: Mike Thomas
[mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 22:19To:
Simon Peyton-Jones; [EMAIL PROTECTED]Subject: Re:
stgSyn/CoreToStg.lhs:1112: Couldn't match `#'
MessageHi Simon.
maybe you need to rebuild the compiler you are compiling *with*?
That's exactly what I'm trying to do with the latest CVS Head, so I assume
you mean to try switching back to the Glasgow team's 5.02 or 5.03 releases
to build. As the compiler I am using was built with the GHC
At 2002-05-14 02:24, Simon Marlow wrote:
This is bizarre: the definition of evaluate in Exception is exactly the
one you gave above, yet they behave differently. You may have uncovered
a compiler bug, I'll look into it.
I might ask which is correct: according to the rules for seq, evaluate'
This is bizarre: the definition of evaluate in Exception is
exactly the
one you gave above, yet they behave differently. You may
have uncovered
a compiler bug, I'll look into it.
I might ask which is correct: according to the rules for seq,
evaluate'
undefined should be bottom, but
At 2002-05-14 02:58, Simon Marlow wrote:
I must admit I can't think of any compelling reasons for the change,
other than the fact that this is functionality that we don't
have at the
moment, and therefore might be useful. Opinions?
I need a function that does this:
evaluate ::
On Sun, May 12, 2002 at 09:31:38PM -0700, Ashley Yakeley wrote:
I have recently been experimenting writing code that replaces large
chunks of the Prelude, compiling with -fno-implicit-prelude. I notice
that I can happily redefine numeric literals simply by creating functions
called
Ashley writes
| I was hoping to do something similar for 'do' notation by redefining
| (), (=) etc., but unfortunately GHC is quite insistent
| that 'do' notation quite specifically refers to GHC.Base.Monad
Dylan replies
| I'm surprised that ghc uses the fromInteger and fromRational
|
On Sun, May 12, 2002 at 09:31:38PM -0700, Ashley Yakeley wrote:
I have recently been experimenting writing code that replaces large
chunks of the Prelude, compiling with -fno-implicit-prelude. I notice
that I can happily redefine numeric literals simply by creating functions
called
Ashley writes
| I was hoping to do something similar for 'do' notation by redefining
| (), (=) etc., but unfortunately GHC is quite insistent
| that 'do' notation quite specifically refers to GHC.Base.Monad
Dylan replies
| I'm surprised that ghc uses the fromInteger and fromRational
|
39 matches
Mail list logo