G'day all.
Quoting Peter Simons <[EMAIL PROTECTED]>:
> At least in my experience, multiplexing servers _are_
> significantly faster than those relying on the OS (or
> whatever library) to do the scheduling. They also tend to be
> much more efficient in terms of memory consumption, thus
> allowing
Andrew J Bromage <[EMAIL PROTECTED]> writes:
> class Plus a b c | a b -> c where
> (+) :: a -> b -> c
> class Mult a b c | a b -> c where
> (*) :: a -> b -> c
This kind of approach was discussed a while ago, and has a bunch of
things to recommend it. Is the funct
[EMAIL PROTECTED] said:
[...]
> If you can wait a day or two, I have some code which needs to be cleaned
> up which does pretty much this.
Thanks to everyone who's replied (including some replies I see in the
inbox that I have not read yet). Yes, I can certainly wait (and would be
interested to
(Apologies for previous incomplete post: Here's the whole thing)
One thing that bugs me about the named record syntax, is that with a datatype:
data T = T {
t_f1 :: X,
t_f2 :: X
};
the function t_f1 has the type of an "accessor", ie
t_f1 :: T -> X
but there doesn't any tidy wa
> DRiFT will let you do that, by deriving get_ and set_ methods, but other
> than that, no. THere was discussion about a year ago (I think) about
> this, with proposed syntax for something, but it never really got off the
> ground. You can probably google for it with my name and some other
>
DRiFT will let you do that, by deriving get_ and set_ methods, but other
than that, no. THere was discussion about a year ago (I think) about
this, with proposed syntax for something, but it never really got off the
ground. You can probably google for it with my name and some other
keywords -
One thing that bugs me about the named record syntax, is that with a datatype:
data T = T {
t_f1 :: X,
t_f2 :: X
};
the function t_f1 has the type of an "accessor", ie
t_f1 :: T -> X
but there doesn't any tidy way to get at the "mutator" function
t_f1' :: X -> T -> T
w
There is updateable syntax.
You can write
> setSquare :: DiningRoom -> Int -> DiningRoom
> setSquarer n = r { square = n }
HTH,
Markus
> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Im Auftrag von Serge D.
> Mechveliani
> Gesende
I think the following notation is all you need:
let x = DRoom 5 7 8 (DTable 1 2)
y = x { square = 6, diningTable = diningTable x { tableSquare = 1 }}
in ...
- Hal
On Wed, 5 Nov 2003, Serge D. Mechveliani wrote:
> Dear Haskellers,
>
> My question is about a nice way to provide a getting/se
Dear Haskellers,
My question is about a nice way to provide a getting/setting
access to the nested record fields.
Example:
---
data House = House {houseNo:: Int,
diningRoom :: DiningRoom
> > data Foo = Foo Int String
>
> and you're looking for Ints and transforming them, it will
> also recurse
> into the strings and look at every character, because it
> doesn't know that
Hm. That could be. I think the problem is that segment is
> data Segemnt = Comp [Segment] Attributes
and
Paul Graunke writes:
> [...] event driven servers (which are supposedly oh so
> much faster.)
At least in my experience, multiplexing servers _are_
significantly faster than those relying on the OS (or
whatever library) to do the scheduling. They also tend to be
much more efficient in terms of
I rpm-packaged darcs[1] 0.9.13 for Linux/ix86. You can get
the srpm and binary rpms from:
http://haskell.org/~petersen/rpms/darcs/
Enjoy, -Jens
Footnotes:
[1] http://abridgegame.org/darcs/
___
Haskell mailing list
[EMAIL PROTECTED]
http://w
13 matches
Mail list logo