On 08-Dec-2003, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
G'day all.
Quoting Sven Panne [EMAIL PROTECTED]:
Granted, C++'s (copy) constructors, destructors and assignment operators
make some things relatively easy compared to C, but the complexity of
handling exceptions *correctly*
I'm wondering about the optimization of ghc. I thought that since
functions are pure in haskell, compiler can/do factorize common
subexpressions when it optimizes a code. But the result of
the following
experiment looks negative; g 10 100 is caluculated twice.
Am I missing something?
A little while ago, I sent a long rambling message [1] containing a key
question in response to an earlier helpful response. I guess my ramblings
were quite reasonably passed over as too much waffle, and the question was
lost. Here, I isolate the question.
From the earlier response, I
On Mon, 08 Dec 2003 16:33:53 +
Graham Klyne [EMAIL PROTECTED] wrote:
A little while ago, I sent a long rambling message [1] containing a
key question in response to an earlier helpful response. I guess my
ramblings were quite reasonably passed over as too much waffle, and
the question
Fergus Henderson [EMAIL PROTECTED] writes:
| Even the C++ standard library itself, which has been
| subject to review by the world's best C++ experts, suffers
| from exception safety problems. A new exception safety
| problem with std::auto_ptr was discovered just last Friday! See
|
I have been trying
Hugs98
This is the average of
floats list calculation program:
accum :: [Float] -
Floataccum list = foldr (+) 0 list
my_avg list = (accum list) / (length
list)
While loading it I got
the compiler
ERROR U:\slav\FP\Avg.hs:11 - Type error in application
*** Expression : accum list / length list
*** Term : accum list
*** Type : Float
*** Does not match : Int
Why accum list should match to Int?
When I try to replace (length list) with number - it works.
length
Yaroslav Korchevsky wrote:
my_avg list = (accum list) / (length list)
ERROR U:\slav\FP\Avg.hs:11 - Type error in application
*** Expression : accum list / length list
*** Term : accum list
*** Type : Float
*** Does not match : Int
Why
Control.Monad.Reader defines instances of Monad and MonadReader for
((-) r). Strangely enough, the documentation claims the Monad instance
comes from Control.Monad, which is untrue.
Here's the relevant chunk of the file. It looks like you came up with
exactly the same code (modulo names).
--
G'day all.
Quoting Gabriel Dos Reis [EMAIL PROTECTED]:
I think it is fair to characterize auto_ptr as a curiously broken
class since its conception and design.
I also think that's a fair characterisation. std::auto_ptr has always
struck me as a fairly brittle abstraction. Learning that it
On 09-Dec-2003, Yaroslav Korchevsky [EMAIL PROTECTED] wrote:
my_avg list = (accum list) / 5 --works fine
xx = 5
my_avg list = (accum list) / xx --doesn't work
-- same message as above
The
11 matches
Mail list logo