Claus,
It may be possible to get the two representations together by applying the
predicate to a reader for x, generated from x, which would complement
something like Hood's writer for x, generated from x. Just as the context
demanding parts of x isn't aware of triggering observations, the
You should do the counting strictly:
Just n - case n+1 of n1 - addToFM f w n1
Careful - that case expression doesn't actually force n to be evaluated.
It's exactly equivalent to
let n1 = n+1 in addToFM f w n1
You need to use seq to force evaluation.
Cheers,
A couple of hours ago, I wrote (in reponse to Claus Reinke's suggestion):
Thanks for this further suggestion. A solution along these lines
might be
possible, but it would still be restricted ...
Actually a mild variant of Claus's proposal seems to work out
quite well. Another way to avoid
Does this mean you can womble along with Claus's suggestion? I'm
feeling a bit swamped at the moment, and not keen to undertake another
open-ended implementation exercise. So if you can manage without, and
perhaps use the experience to refine the specification of a Really
Useful Feature, that'd
Simon,
Does this mean you can womble along with Claus's suggestion? I'm
feeling a bit swamped at the moment, and not keen to undertake another
open-ended implementation exercise. So if you can manage without, and
perhaps use the experience to refine the specification of a Really
Useful
On Mon, Feb 17, 2003 at 11:00:13AM -, Simon Marlow wrote:
I have some CGI programs running with Hugs and I want to use GHC
instead.
What changes must I do to the .hs file?
Is it an easy job?
Depends on lots of things really.
The CGI library that comes with GHC is
Actually a mild variant of Claus's proposal seems to work out
quite well. Another way to avoid the problems with types is
to use a multi-parameter type class. Little example attached.
Glad to be of help. The need to shadow the data types is a bit
annoying, but then the whole generic bit